Jump to content

IIS7 breaking javascript?


Agony
 Share

Recommended Posts

Running the same site with the same files on a local test ( wamp 2.5 based) - it all runs fine. no jscript errors and everything works.

Even jquery doesn't work.

 

 

I have set the permissions and browser does seem to download the .js files.

I could even access them and run a compare ( to the one browser sees from my test and vs iis7 on win2008r2) - identical.

 

what i get in console is:

Uncaught SyntaxError: Unexpected token ILLEGAL 

for line 1. its referring to ink-all.min.js from ink.sapo.pt framework.

 

event tried adding the "; charset=Windows-1252" to the .js mime type - assuming it might be in ansi.. but nothing.

 

​is there something special u have to set/change on iis?

Link to comment
Share on other sites

Test server ( where it works)

Accept-Ranges:bytesCache-Control:max-age=604800Connection:Keep-AliveContent-Encoding:gzipContent-Type:application/javascriptDate:Thu, 05 Jun 2014 02:42:11 GMTETag:"41474-4fa5780af25bf-gzip"Expires:Thu, 12 Jun 2014 02:42:11 GMTKeep-Alive:timeout=5, max=99Last-Modified:Tue, 27 May 2014 01:20:34 GMTServer:Apache/2.4.9 (Win32) PHP/5.5.12Transfer-Encoding:chunkedVary:Accept-Encoding

iis:

Accept-Ranges:bytesDate:Thu, 05 Jun 2014 02:40:34 GMTETag:"7bf915dc4979cf1:0"Last-Modified:Tue, 27 May 2014 01:20:34 GMTServer:Microsoft-IIS/7.5X-Powered-By:ASP.NET

iid response doesn't seem to include content-type.

Link to comment
Share on other sites

You might be looking at a response for IIS telling the browser to use the cached version, try clearing or disabling your cache and seeing if anything changes. A response that contains content should always included content-type, I would also expect to see content-length.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...