javascript - require() on gzip'd file returning wrong-MIME-type error -


My call is required here:

  is needed (['config'] , Function {config (required (['main']);});  

This has been tampered with for a CDN (WS3 + CloudFront), which is Configuration.JS and Main.Jesz.

browser:

  accept-encoding: gzip, deflate, sdch  

P> file:

  content-encoding: gzip content-type: application / x-gzip  

This works fine in Safari. I get this error in Chrome and Firefox:

Resource has been interpreted as a script but has been moved with the MIME type application / X-Gizip: "".

And it never breaks

Any thoughts?

the solution really is very easy, dah!

, I had content-type set application / x-gzip . It is really confusing because it is describing content before compression (and thus, after In decompression, too). Content-Encoding is the one which specifies the actual compression phase.

To fix, I just type gzip'd at content- Type sets File: text / javascript or text / css , etc.

for the proper file type of the original file

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -