Passing parameters to style sheet, e.g. "mystyle.css?color=ffffff"

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

    #16
    Re: Passing parameters to style sheet, e.g. "mystyle.c ss?color=ffffff "

    rjensen@viewcen tral.com wrote:[color=blue]
    > Thanks Harlan. Simply using an .asp page instead of a .css page
    > allows the query string process and appears to work, at least under
    > IE 6.
    >
    > Do you think any browsers are sensitive to the .css extension, or
    > should all browswers access any style sheet reference, as long as the
    > reference in the html file is correct and the style sheet has the
    > correct syntax?
    >
    > Thanks again,
    >
    > Roger[/color]

    Mozilla (I think) doesn't pick up that a .php/.asp file contains css data
    unless you send it with "Content-Type:text/css"


    Comment

    • Brian

      #17
      Re: Passing parameters to style sheet, e.g. "mystyle.c ss?color=ffffff "

      rjensen@viewcen tral.com wrote:[color=blue]
      > Unfortunately, using an asp page for a style sheet does not appear to
      > work for FireFox v 1.0. If I attempt to reference the style sheet
      > as <link rel="stylesheet " type="text/css" href="mystyle.a sp"> it does
      > not pick up the style sheet.[/color]

      Url? I imagine that the stylesheet is sent with the wrong MIME type.
      Fix that and it will work in Firefox.
      [color=blue]
      > However, the reference <link rel="stylesheet " type="text/css"
      > href="mystyle.c ss"> works fine.[/color]

      Firefox mimics IE in a small subset of cases, where the resource is
      likely to be css. I think the MIME type sent with the resource must be
      text/plain as well in order to trigger Firefox's guessing mechanism, but
      I can't be sure in light of what you've reported. Furthermore, it
      appears that the resource url must end in ".css", though I can't be sure
      without a url to test.
      [color=blue]
      > Both of these work fine with IE.[/color]

      Of course. It sniffs content in any case, but only for certain MIME
      types as A. Flavell explained. See his post of 20 Oct 2004 for his
      remarks, including a correction of what I wrote earlier.
      [color=blue]
      > It appears IE does not seem to care what the extension is for the
      > style sheet[/color]

      First, let's be clear: there is no extension on the www. There is a
      resource and its url. That's it. File names, including extensions, are
      only applicable on a filesystem.
      [color=blue]
      > but FireFox does.[/color]

      Only where it chooses to try to guess the type, and only in certain
      versions, and only for css. There was a time when Mozilla obeyed the
      relevant standards entirely, and never tried to second guess the MIME
      header. Alas, it, along with Opera, have followed IE, no doubt in an
      attempt to make it appear that their browsers "work" when in fact, in
      this matter, they are all broken.

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

      Comment

      • Brian

        #18
        Re: Passing parameters to style sheet, e.g. &quot;mystyle.c ss?color=ffffff &quot;

        Alan J. Flavell wrote:[color=blue]
        > On Wed, 20 Oct 2004, Brian wrote:
        >
        >[color=green]
        >> Before SP2, MSIE *ignored* the MIME type entirely,[/color]
        >
        >
        > That's not correct - it's worse than that: they actually /tested/ the
        > MIME type against a list of 26 MIME types before deciding to ignore
        > it.[/color]

        I forgot about that part. Thanks for the correction.
        [color=blue]
        > Any remaining MIME types not on that list were (with some bizarre
        > exceptions related to plugins) handled correctly (including, just to
        > rub salt into the wound, content types like application/msword,
        > application/vnd.ms-excel -[/color]

        That is just plain rediculous. application/msword can be trusted, but
        text/plain cannot? Sheesh.
        [color=blue]
        > So, far from "ignoring" the MIME type, they took a close look at it
        > before deciding to violate the interworking mandates by tossing it
        > aside.[/color]

        Right. I was thinking of this behavior of tossing the MIME type aside
        when I wrote "ignore", but your explanation is clearer.
        [color=blue][color=green]
        >> unless other methods (such as content sniffing) failed.[/color]
        >
        >
        > Not that either: if content sniffing failed, their last resort still
        > didn't involve the original MIME type[/color]

        Perhaps my memory fails me. I thought that using the MIME type header
        was on their list of things to use when content sniffing failed. But I
        cannot read mail or surf the web easily from my laptop computer, where I
        bookmarked the MS documentation of this behavior, so I cannot check it.
        [color=blue]
        > Sometimes, however, it involved what they interpreted as the filename
        > extension[/color]

        I thought that was actually *below* MIME type, which was itself below
        (by several steps) content sniffing. Again, I'm working from memory,
        which isn't (apparently!) what it used to be.

        In any case, the change in SP 2 seems to have reemphasized the
        importance of file extension, with no clear definition of extension on
        the www. Ho hum.

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

        Comment

        • Spartanicus

          #19
          Re: Passing parameters to style sheet, e.g. &quot;mystyle.c ss?color=ffffff &quot;

          Brian <usenet3@juliet remblay.com.inv alid> wrote:
          [color=blue]
          >Only where it chooses to try to guess the type, and only in certain
          >versions, and only for css. There was a time when Mozilla obeyed the
          >relevant standards entirely, and never tried to second guess the MIME
          >header. Alas, it, along with Opera, have followed IE, no doubt in an
          >attempt to make it appear that their browsers "work" when in fact, in
          >this matter, they are all broken.[/color]

          It's a GUI pref option in Opera, I assume that Firefox can also be made
          to behave.

          --
          Spartanicus

          Comment

          • Alan J. Flavell

            #20
            Re: Passing parameters to style sheet, e.g. &quot;mystyle.c ss?color=ffffff &quot;

            On Thu, 21 Oct 2004, Brian wrote:
            [color=blue]
            > Alan J. Flavell wrote:[color=green]
            > > On Wed, 20 Oct 2004, Brian wrote:[/color]
            >[color=green][color=darkred]
            > > > unless other methods (such as content sniffing) failed.[/color]
            > >
            > > Not that either: if content sniffing failed, their last resort still
            > > didn't involve the original MIME type[/color]
            >
            > Perhaps my memory fails me.[/color]

            I think the fault was mine, sorry.

            Gain technical skills through documentation and training, earn certifications and connect with the community


            Their literally "last" resort (step 6) doesn't actually involve
            the server-provided MIME type at all. But some of the earlier steps
            -do- involve some assessment of (rather than total disregard of) the
            server-provided MIME type, and I'd forgotten that.
            [color=blue]
            > I thought that using the MIME type header
            > was on their list of things to use when content sniffing failed.[/color]

            Steps 3, 4, and 5 as described in their woffle seem to be complicated,
            even assuming that they accurately reflect what happens. You're right
            that the server-provided MIME header is still being used for some
            purposes within these steps. Step 2 is the one where the MIME type,
            having been inspected and found to be on their hit-list, is then
            disregarded "if one of the hard-coded [content-sniffing] tests
            succeeded".
            [color=blue]
            > In any case, the change in SP 2 seems to have reemphasized the
            > importance of file extension, with no clear definition of extension
            > on the www. Ho hum.[/color]

            Indeed. No wonder that they also fall foul of these virus
            attachments[1] with file names like "document.t xt
            ..scr"

            sigh.


            [1] "attackment s" is perhaps le typo juste.

            Comment

            Working...