0

I'm visiting a website whose stylesheets have reported MIME type text/html rather than "text/css". Otherwise, they're just fine. I can't control the webserver or fix this problem - but I still want to be able to load the website. Unfortunately, Firefox refuses to load such stylesheets, telling me:

The stylesheet https://some.where/whatever.css was not loaded because its MIME type, “text/html”, is not “text/css”.

How can I force Firefox (version 113 as of the time of writing) to load such stylesheets?

einpoklum
  • 8,783
  • 20
  • 84
  • 153
  • Does that site work on other browsers, e.g., Edge, Brave, etc.? If there is a fundamental error in the page, don't modify your browser to compensate. – DrMoishe Pippik May 21 '23 at 16:36
  • @DrMoishePippik: Yes, it does work in Edge. I even know why the MIME type is mis-reported, I just can't do anything about it. – einpoklum May 21 '23 at 19:17
  • 1. Override the CSS: https://superuser.com/questions/318912/how-can-i-override-the-css-of-a-site-in-firefox-with-usercontent-css 2. Or perhaps save the website to HTML and modify the erroneous CSS? – DrMoishe Pippik May 21 '23 at 20:00
  • @DrMoishePippik: It's a different CSS for different pages; that's not relevant. Also, that CSS changes over time. – einpoklum May 21 '23 at 20:02
  • 1
    Firefox will accept to load stylesheets with a wrong MIME type if a) they are served from the same origin as the document that requests them *and* b) the document is rendered in quirks mode. Preemptive answer, I don't know if and how you can force quirks mode on a per site basis, or otherwise :( – paa May 22 '23 at 15:53

0 Answers0