Giter Club home page Giter Club logo

Comments (8)

xenda avatar xenda commented on July 18, 2024

They should work. Could you send us what do you see and any errors it outputs?

from gmaps.

mwmwmw avatar mwmwmw commented on July 18, 2024

Ahh, under closer inspection it looks like a mimetype issue from Github.

On my, and a co-workers Windows 7 IE9, we're getting:

SEC7112: Script from https://raw.github.com/HPNeo/gmaps/master/gmaps.js was blocked due to mime type mismatch
gmaps
SCRIPT5009: 'GMaps' is undefined
gmaps, line 12 character 7
SEC7112: Script from https://raw.github.com/HPNeo/gmaps/master/gmaps.js was blocked due to mime type mismatch
gmaps
SCRIPT5009: 'GMaps' is undefined
gmaps, line 12 character 7

BUT, the damage has been done my friend. I am now being mocked for my Chrome love in the house of IE. ;P

from gmaps.

xenda avatar xenda commented on July 18, 2024

Hahaha. Sorry to hear that. Seems like Github decided to get a bit of :trollface: on us. Will still take a look and maybe move the scripts to another server just to be sure.

from gmaps.

mwmwmw avatar mwmwmw commented on July 18, 2024

If I load the script directly, or try to download it.. it works. Strange.

from gmaps.

qiao avatar qiao commented on July 18, 2024

Github does not set the correct content-type header for the link.

>> curl -I https://raw.github.com/HPNeo/gmaps/master/gmaps.js   
HTTP/1.1 200 OK
Server: nginx/1.0.13
Date: Thu, 07 Jun 2012 16:52:56 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive
Status: 200 OK
X-RateLimit-Limit: 100
X-Frame-Options: deny
X-RateLimit-Remaining: 100
X-Runtime: 25
Content-Length: 1
Cache-Control: no-cache

The content-type is set to be text/plain instead of text/javascript. And IE will not execute the script due to the mismatch.

Also, serving scripts from code repositories is not a good idea.
You may refer to this post for more details.

from gmaps.

mwmwmw avatar mwmwmw commented on July 18, 2024

Yeah, I had figured this out and everything works fine locally.

On another note, other than these MIME issues why isn't it a good idea to serve scripts from the repositories?

from gmaps.

qiao avatar qiao commented on July 18, 2024

@mwmwmw see http://zoompf.com/blog/2012/05/html5shiv-and-serving-content-from-code-repositories

tl;dr

  1. uncompressed
  2. uncached
  3. unstable

from gmaps.

mwmwmw avatar mwmwmw commented on July 18, 2024

Ahhh, good call. Thanks!

from gmaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.