To speed up the loading time of our site, we postpone the loading of some scripts. This works fine until a couple of days ago. I threw the problem down to this short HTML page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"> </script> <script type="text/javascript"> //<![CDATA[ var scriptUrl = "http://ads.trafficspaces.net/v1.22/adservice.js"; jQuery .getScript( scriptUrl, function () { alert("I'm never called") }); //]]> </script> </head> <body> </body> </html>
It looks like the script in question is being served with the text/plain content type. I'm not sure what happened before the weekend. Could this be a problem?
Looking at Fiddler, it seems that the request has never been executed, but I can get it when I paste the URL into another tab. If I change scriptUrl to one under my control, it works fine. What's happening?
source share