Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3391834
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:50:57+00:00 2026-05-18T03:50:57+00:00

<link type=text/css media=all rel=stylesheet href=./foo.css.txt /> Firbug Error The stylesheet foo.css.txt was not loaded

  • 0
<link type="text/css" media="all" rel="stylesheet" href="./foo.css.txt" />

Firbug Error


The stylesheet foo.css.txt was not loaded because its MIME type, “text/plain”, is not “text/css”.

Explanation


The browser is interpreting the CSS as a text document rather than a CSS, despite any effort to force it’s MIME through the browser. Naturally, in production I will be using foo.css (w/o the txt extension), but I would think this would be possible. It works for JavaScript:

<script type="text/javascript" src="./index.js.txt"></script> 

Other Thoughts


  • Setting type="css" doesn’t show an error in Firebug and the page validates, but the CSS doesn’t load properly – I’m pretty sure that’s not a valid MIME type though. I tried to find a list of MIME types off W3C, but as with everything it’s difficult to find/understand W3C

  • This does work with other, less popular, extensions such as dat: href="./foo.css.dat"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:50:57+00:00Added an answer on May 18, 2026 at 3:50 am

    When you use the type attribute in HTML you are saying “When you fetch this resource, expect to get this type of data.” This allows user agents (such as browsers) to avoid requesting resources that they know they can’t handle. For CSS you need to set this to text/css.

    When the server responds to the request, the HTTP Content-Type header says “This content is of this type”. It is canonical and must also be set to text/css for CSS data.

    Because you have used a .txt file, the server (in a default configuration) says that the file contains data that is text/plain so it tells the browser that. You cannot override this from the browser.

    It works for JavaScript

    Browsers, for various reasons, tend to ignore the Content-Type specified by servers for JavaScript. This could be considered a bug in those browsers.

    Setting type=”css” doesn’t show an error in Firebug and the page validates, but the CSS doesn’t load properly – I’m pretty sure that’s not a valid MIME type though

    css is not a registered MIME type, the browser doesn’t recognise it as a stylesheet language that it can understand, so it doesn’t event try to download it.

    I tried to find a list of MIME types off W3C, but as with everything it’s difficult to find/understand W3C

    The W3C isn’t responsible for the MIME type registry, which you can find at http://www.iana.org/assignments/media-types/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<link href=http://example.com/example.php?id=0&grab=http%3A%2F%2Fwww.example.org%2Fcss%2Fmaster.css rel=stylesheet type=text/css media=all /> - is that URL allowed? Any MIME type
<!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8/> <title>FAQ Section</title> <link rel=stylesheet type=text/css href=styles.css/>
All, I'm using the following code: <head> <title>Wedding Page</title> <meta http-equiv=Content-Type content=text/html; charset=utf-8 />
The code: object Link { //TYPE-1 (purely functional) def apply(name: String, target: Page, f:
From MSDN ( link ): The type PrintDocumentImageableArea has no public constructor. Hence, the
Link with data-rel=back causes two (double) back transitions instead of a single. The issue
<script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools-yui-compressed.js></script> <script type=text/javascript src=sexyalertbox.v1.2.moo.js></script> <link rel=stylesheet type=text/css media=all href=sexyalertbox.css/> <body> <p><a href=#
is my datatable not show because of css code? <html> <head> <title>OQC INSPECTION REPORT</title>
Link: http://www.fraynepainting.com/services The problem is that div#dditem_2 (the div with the Take a look...
Link to menu: Professional dropdown #2 I was wondering if these posts Suckerfish meets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.