RTC Forums
November 01, 2024, 04:31:51 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Resource interpreted as Script but transferred with MIME type text/plain  (Read 4389 times)
HalcyonLogic
Newbie
*
Posts: 45


« 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
Logged
Kevin Powick
RTC Expired
*
Posts: 87


« Reply #1 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
Logged

Linux is only free if your time is worthless
HalcyonLogic
Newbie
*
Posts: 45


« Reply #2 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  Smiley

Cheers,
Richard
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 17 queries.