shilling-md / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 1 forks source link

Wrong mime-type being served #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using Chrome browser, open a page which loads your SHA256 script using the 
getScript method
2. Check your Console tab in the developer tools window
3. You will see a warning with the message "Resource interpreted as Script but 
transferred with MIME type text/plain: 
"http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha256.js?_=135885
4705367""

What is the expected output? What do you see instead?

Your .js files should be served using the mime type: "application/javascript"

What version of the product are you using? On what operating system?

jQuery 1.9.0, 
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha256.js

Original issue reported on code.google.com by hector.b...@gmail.com on 22 Jan 2013 at 11:55

GoogleCodeExporter commented 8 years ago
Google Code Project Hosting doesn't technically give us a place to host asset 
files such as JS files. Linking to a file in the SVN browser is a bit of a 
hacky workaround, and I do that only because I want to make it easy for people 
to get started by providing copy-paste code examples that just work. In a 
production environment, you'll probably want to host the JS files yourself. 
That will ensure a correct mime type, as well as allow you to control gzipping, 
caching, and CDN services.

Original comment by Jeff.Mott.OR on 22 Jan 2013 at 12:45

GoogleCodeExporter commented 8 years ago
There is a way to fix this issue in case you are interested: 
http://www.makingdifferent.com/2012/05/freely-host-html-css-js-other-static.html

Thanks for such a great piece of code.

Original comment by hector.b...@gmail.com on 22 Jan 2013 at 3:19

GoogleCodeExporter commented 8 years ago
Nice. Didn't know Google Code respected the SVN mime-type property. The 3.1.2 
tag build files should all have the correct mime-type now.

Original comment by Jeff.Mott.OR on 22 Jan 2013 at 5:40