Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 1, 2026.

Javascript Problem which is related with the MIME type in Firefox

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch
Impact
0
Hi,

I have been constructing a website which includes some Javascript code. These, codes give good result in IE, but they crash in Firefox. And the error message is

Error: The stylesheet http://127.0.0.1/web/main.php was not loaded because its MIME type, "text/html", is not "text/css".

I search it many times in google, and found some answers, but all the answers which I saw are not enough for the solution.

Do you have any idea about it? :?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
How are you using it?

You need to override the type that the HTTPd is sending to the browser. If your css is in another file, the easiest way to do this is use a .css extension on the file, and make sure your <link> tags have text/css in them.

If you're using <style> tags to inline your CSS...well, don't do that. Put them in separate files and link to them...it makes your life easier.
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back