CSS Menu Rendering Problem in Opera

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan J. Flavell

    #16
    Re: CSS Menu Rendering Problem in Opera

    On Sat, 21 Aug 2004, Lachlan Hunt wrote:
    [color=blue][color=green]
    > > HTTP_ACCEPT = application/vnd.ms-excel, application/msword,
    > > application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
    > > image/pjpeg, */*[/color]
    >
    > How did you get this information?[/color]

    (See other posting.)
    [color=blue]
    > It's strange that it doesn't include text/html as accepted variant.[/color]

    You noticed! IE has to make do with it via the */* selection.

    But that means (given normal Apache settings) that if the server has a
    ..doc, .ppt or .xls version of the page, it will get chosen in
    preference to any WWW-compatible version. Which kind-of says it all,
    as far as Redmond's view of the "World" is concerned, hmmm?
    [color=blue]
    > I asked the same question a few days ago in a private e-mail to Jim
    > Ley, and he tole me this:
    >
    > # Yep, it's a registry setting.
    > # HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows \CurrentVersion \Internet
    > # Settings\Accept ed Documents[/color]

    Thanks. I think Jim told me earlier, too, but the grey cells had
    faded and I couldn't quite put my finger on it when Els asked.

    Comment

    • Lachlan Hunt

      #17
      Re: 406 Response Error (was: Re: CSS Menu Rendering Problem in Opera)

      Alan J. Flavell wrote:[color=blue]
      > Additionally, a 406 Not Acceptable error was encountered while
      > trying to use an ErrorDocument to handle the request.[/color]

      Yes, I was aware of that. That occured when, as I descibed my previous
      post, I tried to set:

      ErrorDocument 406 /error/406

      which refers to <http://www.lachy.id.au/error/406>

      But that document was also en-au, due to the fact that I had set

      DefaultLanguage en-au

      in my .htaccess. Sending the documents as just en will be fine, if
      that's going to cause problems, but I did want en-au, so that it could
      be distinguished from American english that has corrupted the spelling
      of so many words in the english language. It gets annoying since I have
      to spell words like "colour" as "color" when used in CSS, but I must be
      so used to it, I always seem to subconsiously pick the correct spelling
      depending on the context I'm using it.

      However, I removed the DefaultLanguage directive and it now works
      correctly. Any 406 response resulting from an an Accept: header that
      does not contain text/html, application/xhtml+xml or a wildcard now gets
      the custom 406 document. Any Accept-Language: header just sends either
      the HTML or XHTML document as en anyway.

      Although this is off topic for ciwa.html, if anyone knows how I can get
      the best of both worlds and still send the custom 406 document, while
      having my default language as en-au, that would be appreciated.

      --
      Lachlan Hunt


      Please direct all spam to abuse@127.0.0.1
      Thank you.

      Comment

      • Brian

        #18
        Re: CSS Menu Rendering Problem in Opera

        Lachlan Hunt wrote:

        Els wrote[color=blue][color=green][color=darkred]
        >>> What I still don't get, is that I still get a 406 in IE...[/color][/color][/color]

        Alan J. Flavell wrote:[color=blue][color=green]
        >> HTTP_ACCEPT = application/vnd.ms-excel, application/msword,
        >> application/vnd.ms-powerpoint, image/gif, image/x-xbitmap,
        >> image/jpeg, image/pjpeg, */*[/color][/color]

        [color=blue]
        > How did you get this information?[/color]

        If you have access to Apache logs, just look at access logs; you may
        need to configure the log to include the info you want. Otherwise, you
        could try A.Flavell's useful-looking Perl script. (I tried it, then
        remebered that I run Widows -- Oh yeah! -- and don't have Perl available.)
        [color=blue]
        > It's strange that it doesn't include text/html as accepted variant.[/color]

        Strange, or perverted, take your choice. You seem to have missed some
        entertaining discussions in ciwasd about just that strange fact. Might
        want to have a look.
        [color=blue]
        > However, that sort of explains why it accepts plain text over HTML.[/color]

        Or MS Word over text/html, as I learned when I first tried content
        negotiation. MSIE's behavior was so strange to me, and buggy, and
        potentially confusing to visitors, that I abandoned the idea altogether.
        [color=blue]
        > I just tested it, but the index.txt document served as text/plain
        > contained HTML, and as most of you know, it sniffed the content and
        > rendered it as HTML.[/color]

        Content sniffing is now copied in Firefox and Opera :-( albeit only
        to "fix" css incorrectly served as text/plain.

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

        Comment

        • Alan J. Flavell

          #19
          Re: CSS Menu Rendering Problem in Opera

          On Sat, 21 Aug 2004, Brian wrote:
          [color=blue]
          > If you have access to Apache logs, just look at access logs; you may
          > need to configure the log to include the info you want.[/color]

          True, You almost certainly -will- need to configure the log - this
          infmration isn't logged by default (and could become quite voluminous
          if you log it routinely)
          [color=blue]
          > Otherwise, you could try A.Flavell's useful-looking Perl script. (I
          > tried it, then remebered that I run Widows -- Oh yeah! -- and don't
          > have Perl available.)[/color]

          Indigoperl is a handy bundled package containing Apache, Perl and PHP.
          I'm told it's just the thing for developers whose OS is in thrall to
          Bill ;-) And now with new improved Apache 2.0.*



          "Just unzip and run setup". But take care you're not offering Apache
          services to the whole Internet ;-)

          If I hadn't already, for various reasons at various times, installed
          Perl (Win32 5.6 and 5.8, plus Cygwin Perl 5.8) and Apache (1.3 and
          2.0) separately on the Win2K laptop, then Indigoperl is what I would
          do.

          Comment

          • Alan J. Flavell

            #20
            Re: 406 Response Error (was: Re: CSS Menu Rendering Problem in Opera)

            On Sat, 21 Aug 2004, Lachlan Hunt wrote:

            [...][color=blue]
            > DefaultLanguage en-au[/color]
            [...]
            [color=blue]
            > Although this is off topic for ciwa.html,[/color]

            (nor indeed for this group ;-))
            [color=blue]
            > if anyone knows how I can get the best of both worlds and still send
            > the custom 406 document, while having my default language as en-au,
            > that would be appreciated.[/color]

            Well, there may be some helpful points in my web page on the topic,


            If there's any questions afterwards then you might want to take it up
            on c.i.w.servers.u nix (which is where non-Win-specific Apache issues
            get discussed in the c.i.w.* hierarchy. I'm afraid I don't read any
            Apache-specific groups).

            If I might offer a hint - look carefully at the meaning of the
            DefaultLanguage directive. It might not really be what you want; but
            I haven't been following your issues in detail, so I'm not sure.

            Comment

            • Lachlan Hunt

              #21
              Re: 406 Response Error

              Alan J. Flavell wrote:
              [color=blue][color=green]
              >>Although this is off topic for ciwa.html,[/color]
              >
              > (nor indeed for this group ;-))[/color]

              Oops... Of course, I mean ciwa.stylesheet s. Just a force of habbit for
              so many threads being off topic for ciwa.html.
              [color=blue]
              > Well, there may be some helpful points in my web page on the topic,
              > http://ppewww.ph.gla.ac.uk/~flavell/www/lang-neg.html[/color]

              Thanks, I'll take a look[color=blue]
              >
              > If there's any questions afterwards then you might want to take it up
              > on c.i.w.servers.u nix[/color]

              I will do.
              [color=blue]
              > If I might offer a hint - look carefully at the meaning of the
              > DefaultLanguage directive. It might not really be what you want; but
              > I haven't been following your issues in detail, so I'm not sure.[/color]

              I probably won't worry about it actually, because I just noticed that
              without it, the language is set by the lang or xml:lang attributes in
              the document, so it's fairly redundant and could potentially cause a
              conflict if I ever wrote a document in another language. But since, I'm
              not multilingual, that's not very likely to happen anyway.

              --
              Lachlan Hunt


              Please direct all spam to abuse@127.0.0.1
              Thank you.

              Comment

              • Brian

                #22
                Re: CSS Menu Rendering Problem in Opera

                Alan J. Flavell wrote:
                [color=blue]
                > He should however give some thought to his 406 custom error handling,
                > because otherwise he gets:
                >
                > Additionally, a 406 Not Acceptable error was encountered while
                > trying to use an ErrorDocument to handle the request.[/color]

                This has to be the most unfortunately named error in the spec. Even if
                language does not play into it, it's hard to create a 406 error message
                that would not confuse the general public. "Not Acceptable" tends to
                connote that the user did something that the server found unacceptable,
                instead of that the server could not find anything acceptable to the user.

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

                Comment

                • Lachlan Hunt

                  #23
                  Re: CSS Menu Rendering Problem in Opera

                  Brian wrote:[color=blue][color=green]
                  >> However, that sort of explains why it accepts plain text over HTML.[/color]
                  >
                  > Or MS Word over text/html...[/color]

                  Gee, that's secure. I could send a word document with a macro virus to
                  IE users... That could be fun :-) It'd probably work too, since a lot
                  of users don't update virus scanners either.
                  [color=blue]
                  > Content sniffing is now copied in Firefox and Opera :-( albeit only
                  > to "fix" css incorrectly served as text/plain.[/color]

                  And Safari too, apparently:


                  However, sniffing for CSS served as text/plain is not as bad when it can
                  be determined from the context of the request that it should be CSS.
                  ie. when a <link> element specifies the type to be text/css. Although
                  it breaks the rules of the HTTP Content-Type header, it can be fairly
                  confidently guessed that it is meant to be CSS.

                  It is, however, an unfortunate result of Internet Exploder destroying
                  every standard in every possible way you can imagine, and thus allowing
                  authors and site administrators to get away with it.

                  Content sniffing like MSIE does, and the way Safari appears to in that
                  article is bad because there is no other contextual information to
                  obtain that information from, so the UA has no right to guess, at least
                  without the user's consent.

                  However, Mozilla does actually issue an error in the JavaScript console
                  when CSS is served as text/plain shows. I just tested it, though it is
                  a strange place for non-scripting error message.

                  Error: The stylesheet http://localhost/lib/style/basic/coolblue was
                  not loaded because its MIME type, "text/plain", is not "text/css".

                  Also, it didn't actually apply the style sheet for my test, though I
                  have seen this error before, with the style sheet applied.

                  --
                  Lachlan Hunt


                  Please direct all spam to abuse@127.0.0.1
                  Thank you.

                  Comment

                  • Brian

                    #24
                    OT: 406 Response Error

                    Lachlan Hunt wrote:
                    [color=blue]
                    > I tried to set:
                    >
                    > ErrorDocument 406 /error/406
                    >
                    > which refers to <http://www.lachy.id.au/error/406>
                    >
                    > But that document was also en-au, due to the fact that I had set
                    >
                    > DefaultLanguage en-au[/color]
                    [color=blue]
                    > how I can get the best of both worlds and still send the custom 406
                    > document, while having my default language as en-au[/color]

                    Set a different default language (en) for the directory that contains
                    error documents, using another .htaccess file.

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

                    Comment

                    • Brian

                      #25
                      Re: CSS Menu Rendering Problem in Opera

                      Lachlan Hunt wrote:
                      [color=blue]
                      > Brian wrote:
                      >[color=green][color=darkred]
                      >>> However, that sort of explains why it accepts plain text over
                      >>> HTML.[/color]
                      >>
                      >> Or MS Word over text/html...[/color]
                      >
                      > Gee, that's secure. I could send a word document with a macro virus
                      > to IE users...[/color]

                      I hadn't thought of that. FYI, MSIE does not launch MS Word as a
                      separate application; instead, it opens a Word session inside the
                      browser chrome. That may make a differenece in security, or perhaps not.
                      In any case, I imagine it makes it more confusing for visitors, which is
                      why I turned off content negotiation on a site I maintain.
                      [color=blue]
                      > http://diveintomark.org/archives/200...ntent-sniffing[/color]

                      Server does not respond. (I get that a lot with that site.)
                      [color=blue]
                      > Mozilla does actually issue an error in the JavaScript console when
                      > CSS is served as text/plain shows. I just tested it, though it is a
                      > strange place for non-scripting error message.[/color]

                      I thought the same thing when I first encountered such an error.
                      [color=blue]
                      > Error: The stylesheet http://localhost/lib/style/basic/coolblue was
                      > not loaded because its MIME type, "text/plain", is not "text/css".
                      >
                      > Also, it didn't actually apply the style sheet for my test,[/color]

                      Strange.
                      [color=blue]
                      > though I have seen this error before, with the style sheet applied.[/color]

                      As have I, with the error that the stylesheet was applied after a mime
                      fix. Perhaps this is a "quirks" v. "standards" mode thing.

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

                      Comment

                      • Alan J. Flavell

                        #26
                        Re: OT: 406 Response Error

                        On Sat, 21 Aug 2004, Brian wrote:
                        [color=blue]
                        > Set a different default language (en) for the directory that contains
                        > error documents, using another .htaccess file.[/color]

                        I have to say that I don't think that's the answer, sorry. The 406
                        dilemma will still be there when the visitor requests, for example,
                        language "nl" only.

                        The first part of this question is, should one be using a custom 406
                        page at all? Apache automatically produces a nice little menu of
                        available variants (along with its unpleasant error message text), and
                        the RFC says that the server *SHOULD* produce such a menu. But if you
                        create a custom 406 page, then you lose that automatically-generated
                        menu. Short of rebuilding the module, you can't substitute the error
                        report text with some text of your choice, without losing the
                        automatically-generated menu.

                        Therefore, it seems that any custom 406 page needs to re-create a menu
                        of available variants. Which is tedious and error-prone.

                        The alternative is to avoid a 406 situation developing, by arranging
                        for one of the variants to be returned even when nothing matches. And
                        one of the keys to being able to do that is not to specify a
                        DefaultLanguage at all.

                        And then nominate one of the variants to be the non-language-specific
                        variant, and that'll be the one which is returned when none of the
                        requester's language selections match. I say more about that in the
                        cited web page, and I can only emphasise the remark I made before:
                        look carefully at the documentation for DefaultLanguage , it might not
                        do what you assume it does.

                        If you only wanted to advertise the HTTP content language, rather than
                        also influencing the content negotiation in unintended ways, then
                        maybe what is wanted in the .htaccess is a "Header" directive - I
                        haven't looked into that in detail, though - I suppose it would be
                        e.g:

                        Header set Content-Language en-au

                        Comment

                        • Lachlan Hunt

                          #27
                          Re: CSS Menu Rendering Problem in Opera

                          Brian wrote:[color=blue][color=green]
                          >> Also, it didn't actually apply the style sheet for my test,[/color]
                          >
                          > Strange.
                          >[color=green]
                          >> though I have seen this error before, with the style sheet applied.[/color]
                          >
                          > As have I, with the error that the stylesheet was applied after a mime
                          > fix. Perhaps this is a "quirks" v. "standards" mode thing.[/color]

                          Yep, that it. I just did another test, and it applies it when in Quirks
                          Mode, but not when in Standards, or Almost Standards Mode.
                          [color=blue][color=green]
                          >> Yeah, God Hates IE too. :-)[/color]
                          >
                          > As long as you're in communication with Him, perhaps you could ask him
                          > to smite IE when he has a moment? :-)[/color]

                          Perhaps I'm just tired, since it's 04:00 here and I'm watching the
                          Olympics, but I couldn't stop laughing at that. I'll see what do
                          though. :-D

                          --
                          Lachlan Hunt


                          Please direct all spam to abuse@127.0.0.1
                          Thank you.

                          Comment

                          • Brian

                            #28
                            Re: OT: 406 Response Error

                            Alan J. Flavell wrote:[color=blue]
                            > Brian wrote:
                            >[color=green]
                            >> Set a different default language (en) for the directory that
                            >> contains error documents, using another .htaccess file.[/color]
                            >
                            > I have to say that I don't think that's the answer, sorry.[/color]

                            Apologies, I've used that technique to overcome other problems,
                            compeltely unrelated to 405, or indeed content negotiation.
                            [color=blue]
                            > The 406 dilemma will still be there when the visitor requests, for
                            > example, language "nl" only.[/color]

                            I was only giving a quick solution to the double 406, assuming that the
                            op was experienced enough to work out the rest of it.
                            [color=blue]
                            > Apache automatically produces a nice little menu of available
                            > variants (along with its unpleasant error message text), and the RFC
                            > says that the server *SHOULD* produce such a menu. But if you create
                            > a custom 406 page, then you lose that automatically-generated menu.[/color]

                            Right you are. In fact, you've jogged my memory: this why I've avoided
                            the whole mess. I'd rather not expose the novice user to a cryptic
                            message, and the alternative is to provide no such menu.
                            [color=blue]
                            > I can only emphasise the remark I made before: look carefully at the
                            > documentation for DefaultLanguage , it might not do what you assume it
                            > does.[/color]

                            All good advice. I should have kept my mouth shut.

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

                            Comment

                            • Alan J. Flavell

                              #29
                              Re: OT: 406 Response Error

                              On Sat, 21 Aug 2004, Brian wrote:
                              [color=blue]
                              > I should have kept my mouth shut.[/color]

                              Not at all! Discussions like this help to identify points that might
                              otherwise have gone unnoticed. I've learned something new, anyway.

                              Comment

                              Working...