Title: Resource interpreted as Script but transferred with MIME type text/plain Post by: HalcyonLogic on May 30, 2013, 01:12:56 AM Gentlemen,
I have a few Javascript and CSS files in a subfolder where my webpages are and noticed I get the following warnings in my browser (Chrome): Resource interpreted as Script but transferred with MIME type text/plain: "http://mywebsite.com:8081/settings.js". Resource interpreted as Script but transferred with MIME type text/plain: "http://mywebsite.com:8081/mycss.css". ... ... Any idea how I can take care of those warnings? What am I doing wrong? Richard Title: Re: Resource interpreted as Script but transferred with MIME type text/plain Post by: Kevin Powick on May 30, 2013, 03:16:27 AM You're sending the Javascript HTTP response with content-type:text/plain. You need to send the response with content-type:application/javascript.
Edit: for the CSS you need content-type:text/css Title: Re: Resource interpreted as Script but transferred with MIME type text/plain Post by: HalcyonLogic on May 30, 2013, 04:52:53 PM Thanks (again) for the help Kevin.
After I posted my question, I remembered seeing something about a "GetContentType" routine in one of the RTC demos (Forum). Figured it was something silly like that, in any case, it's all working without warnings now. And life is good again :) Cheers, Richard |