Mozilla shows the following warning while IE doesn't show any error.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nick

    Mozilla shows the following warning while IE doesn't show any error.

    The warning message is:

    Warning: The stylesheet http://www.jewelrybyponce.com/popup/popup.css
    was loaded as CSS even though its MIME type, "applicatio n/octet-stream",
    is not "text/css".

    What cause the problem? There is not "applicatio n/octet-stream" in the
    html or css code...
  • John Bokma

    #2
    Re: Mozilla shows the following warning while IE doesn't show anyerror.

    nick wrote:
    [color=blue]
    > The warning message is:
    >
    > Warning: The stylesheet http://www.jewelrybyponce.com/popup/popup.css
    > was loaded as CSS even though its MIME type, "applicatio n/octet-stream",
    > is not "text/css".
    >
    > What cause the problem? There is not "applicatio n/octet-stream" in the
    > html or css code...[/color]

    Ask your *hosting provider* to add the MIME type for css to mime.types
    (if Apache) ie there should be a line:

    text/css css


    --
    John MexIT: http://johnbokma.com/mexit/
    personal page: http://johnbokma.com/
    Experienced Perl programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html

    Comment

    • Neal

      #3
      Re: Mozilla shows the following warning while IE doesn't show any error.

      On Mon, 14 Jun 2004 05:55:55 -0400, nick <nbdy9@removeth is.hotmail.com>
      wrote:
      [color=blue]
      > The warning message is:
      >
      > Warning: The stylesheet http://www.jewelrybyponce.com/popup/popup.css
      > was loaded as CSS even though its MIME type, "applicatio n/octet-stream",
      > is not "text/css".
      >
      > What cause the problem? There is not "applicatio n/octet-stream" in the
      > html or css code...[/color]


      Your server is mis-serving the document. If you are on an Apache server,
      add a document to your root directory named ".htaccess" . In it write this:

      AddType 'text/css; charset=UTF-8' .css

      using the character set you are using, of course.

      If it's not an Apache server, whoever runs your server must set the proper
      MIME type for .css. If they are reluctant, change hosts. I'm not being
      facetious here, I'm serious. There's absolutely no good reason for any
      competent web host to serve .css as anything but text/css in this day and
      age.

      Comment

      • nick

        #4
        Re: Mozilla shows the following warning while IE doesn't show anyerror.

        John Bokma wrote:[color=blue]
        > nick wrote:
        >[color=green]
        >> The warning message is:
        >>
        >> Warning: The stylesheet http://www.jewelrybyponce.com/popup/popup.css
        >> was loaded as CSS even though its MIME type,
        >> "applicatio n/octet-stream", is not "text/css".
        >>
        >> What cause the problem? There is not "applicatio n/octet-stream" in the
        >> html or css code...[/color]
        >
        >
        > Ask your *hosting provider* to add the MIME type for css to mime.types
        > (if Apache) ie there should be a line:
        >
        > text/css css
        >
        >[/color]
        Thanks, is there any serious problem if leave it along?

        Comment

        • Brian

          #5
          Re: Mozilla shows the following warning while IE doesn't show anyerror.

          nick wrote:
          [color=blue]
          > John Bokma wrote:
          >[color=green]
          >> nick wrote:
          >>[color=darkred]
          >>> Warning: The stylesheet http://www.jewelrybyponce.com/popup/popup.css
          >>> was loaded as CSS even though its MIME type,
          >>> "applicatio n/octet-stream", is not "text/css".[/color][/color][/color]

          In other words, it violated the standard. Well, at least it warns the
          user.
          [color=blue][color=green]
          >> text/css css[/color][/color]
          [color=blue]
          > Thanks, is there any serious problem if leave it along?[/color]

          Yes. The http protocol is unambiguous about this: the content type
          header is definitive. If it claims application/octet-stream, then it
          sure isn't text/css. A browser which conforms to the http protocol
          will use the header, and since there is no stylesheet whose content
          type is application/octet-stream, it will ignore the stylesheet
          altogether. Mozilla in the early 1.x version (1.1, 1.2...?) did
          exactly that, and I had stylesheets fail to load until the university
          where I used to work fixed their mime.types file.

          --
          Brian (remove ".invalid" to email me)

          Comment

          • nick

            #6
            Re: Mozilla shows the following warning while IE doesn't show anyerror.

            Brian wrote:
            [color=blue]
            > nick wrote:
            >[color=green]
            >> John Bokma wrote:
            >>[color=darkred]
            >>> nick wrote:
            >>>
            >>>> Warning: The stylesheet
            >>>> http://www.jewelrybyponce.com/popup/popup.css was loaded as CSS even
            >>>> though its MIME type, "applicatio n/octet-stream", is not "text/css".[/color][/color]
            >
            >
            > In other words, it violated the standard. Well, at least it warns the user.
            >[color=green][color=darkred]
            >>> text/css css[/color][/color]
            >
            >[color=green]
            >> Thanks, is there any serious problem if leave it along?[/color]
            >
            >
            > Yes. The http protocol is unambiguous about this: the content type
            > header is definitive. If it claims application/octet-stream, then it
            > sure isn't text/css. A browser which conforms to the http protocol will
            > use the header, and since there is no stylesheet whose content type is
            > application/octet-stream, it will ignore the stylesheet altogether.
            > Mozilla in the early 1.x version (1.1, 1.2...?) did exactly that, and I
            > had stylesheets fail to load until the university where I used to work
            > fixed their mime.types file.
            >[/color]
            ic, however, it seems the stylesheet is working - when I am using
            Mozilla 1.6...

            Comment

            • Shawn K. Quinn

              #7
              Re: Mozilla shows the following warning while IE doesn't show any error.

              nick wrote:
              [color=blue]
              > ic,[/color]

              You misspelled "I see".
              [color=blue]
              > however, it seems the stylesheet is working - when I am using Mozilla
              > 1.6...[/color]

              It only appears to work because of Mozilla's error recovery. You cannot rely
              on browser error recovery. The MIME type of your CSS stylesheet is wrong
              and needs to be corrected.

              --
              Shawn K. Quinn

              Comment

              • Brian

                #8
                Re: Mozilla shows the following warning while IE doesn't show anyerror.

                nick wrote:
                [color=blue]
                > Brian wrote:
                >[color=green]
                >> nick wrote:
                >>[color=darkred]
                >>> John Bokma wrote:
                >>>
                >>>> nick wrote:
                >>>>
                >>>>> Warning: The stylesheet
                >>>>> http://www.jewelrybyponce.com/popup/popup.css was loaded as CSS
                >>>>> even though its MIME type, "applicatio n/octet-stream", is not
                >>>>> "text/css".[/color]
                >>[color=darkred]
                >>> is there any serious problem if leave it along?[/color]
                >>
                >> Yes. The http protocol is unambiguous about this: the content type
                >> header is definitive. If it claims application/octet-stream, then it
                >> sure isn't text/css.[/color][/color]
                [color=blue]
                > ic, however, it seems the stylesheet is working - when I am using
                > Mozilla 1.6...[/color]

                It seems that Mozilla has joined Opera, which already decided to
                violate the standard as IE/Win does. That way, broken sites still
                "work" in the browser. As I said, earlier versions of Mozilla, and
                certain Netscape releases that were based on them, do follow the
                standard in this regard, and will not load a stylesheet unless its
                content type is text/css.

                --
                Brian (remove ".invalid" to email me)

                Comment

                Working...