Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP linked stylesheet mime type problem in firefox

Posted on 2009-04-10
3
Medium Priority
?
591 Views
Last Modified: 2012-06-27
I have an asp page that ignores the stylesheet in firefox. I have researched it and understand the problem, just not how to fix it. The error that I get in the error console is: the stylesheet XXXX was not loaded because it's mime type "application/octet-stream" is not "text/css".

Here is my link line:

<link rel="stylesheet" type="text/css" href="stylesheets/style.css">
I have tried different link references, /stylesheets/style.css, ./stylesheets/style.css including full url. I have also tried adding <% response.contenttype="text/css" %> before the line, but that did not help either as the page nows opens up in viewsource mode. The server is sending the linked stylesheet with the same mime type as the page and firefox, correctly, does not assume the correct mime type.
0
Comment
Question by:troyd1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
David S. earned 1500 total points
ID: 24120688
The simplest solution would be to change the mime-type the server associates with the ".css" extension.

Another would be to rename the stylesheet to "style.asp" and then set response.contenttype at the top of the file.
0
 

Author Comment

by:troyd1
ID: 24169840
The first does not work for asp pages. It treats them all as asp. FF requires the content type to be text/css.
0
 
LVL 43

Expert Comment

by:David S.
ID: 24170741
> FF requires the content type to be text/css.

Yes, I know.  Perhaps you don't understand what I meant.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question