1

We have a vendor that switched our files over to a new server.

We had a carousel on our homepage that was using javascript saved on the vendor server.

After the move the carousel javascript won't load and the carousel is broke (been working for a year and we haven't touched a file).

So the odd thing is when I debug in FF I see our css and js for the carousel - I am also using full URLs for everything so it can't be a directory issue (Windows/ASP).

Now if I take the links for css and js (they are in the same folder) and try to hit them remotely from my laptop with the carousel code saved locally, the css works but not the js. No js in the folders they gave us work remotely.

However I see the js loaded in FF debug. And if I copy the js, save it, and link to my local copy... the carousel works fine. Also if I go directly to the javascript saved on vendor server... it loads fine on a page.

What could be going on? Perm issue?

Edit: Header info.

Response Headers From Cache
Accept-Ranges   bytes
Content-Length  36927
Content-Type    application/x-javascript
Date    Sun, 25 May 2014 19:55:58 GMT
Etag    "b8387cc1cc77cf1:b88"
Last-Modified   Sun, 25 May 2014 03:52:32 GMT
Server  Microsoft-IIS/6.0
X-Powered-By    ASP.NET
  • 2
    Have you had a look in the javascript console of your browser to see if it throws an error? – Steve May 25 '14 at 7:05
  • 2
    Are the JS files returning the correct Content-Type header? – MrWhite May 25 '14 at 9:53
  • @Steve - yes, not seeing any of the functions I need is how I deduced they weren't being loaded right. – blankip May 25 '14 at 17:36
  • @w3d - what am I checking? The script types are application/javascript. The exact files work locally. But when copied to vendor server they don't work. Also there are tons of script working on the page. This one happens to be entered from an editor (crappy CMS) while the others are part of header or base html. – blankip May 25 '14 at 18:39
  • Well, if the server is sending a Content-Type header of application/javascript (or text/javascript) with that JS file then it should be OK and it is something else. However, the symptoms you mention are consistent with the server sending an incorrect mime-type, or being omitted entirely (and since this problem started when you changed server that does sound quite probable). If the server does send an incorrect mime-type (such as text/plain, text/html, etc.) then the browser (particularly FF) will simply not interpret the JS file as JavaScript. How is this file served differently? – MrWhite May 25 '14 at 19:00