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. 
Comments
Post a Comment