Is the website ok?

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

    #16
    Re: Is the website ok?

    On Sun, 20 Jun 2004 22:17:48 -0400, Leif K-Brooks <eurleif@ecritt ers.biz>
    wrote:
    [color=blue]
    > Neal wrote:[color=green]
    >> So, if you don't plan to use PHP, there's no way I know of to serve it
    >> as application/xml+xhtml to some browsers and as text/html to others.[/color]
    >
    > http://httpd.apache.org/docs/content-negotiation.html[/color]

    I'm basically familiar with browsers telling the server what MIMEs they
    accept. What I'm not clear on from this document is how I configure Apache
    to send either text/html or application/xml+xhtml to a browser for the
    same file based on its accept request.

    Comment

    • Leif K-Brooks

      #17
      Re: Is the website ok?

      Neal wrote:[color=blue]
      > On Sun, 20 Jun 2004 22:17:48 -0400, Leif K-Brooks
      > <eurleif@ecritt ers.biz> wrote:[color=green]
      >> http://httpd.apache.org/docs/content-negotiation.html[/color]
      >
      > I'm basically familiar with browsers telling the server what MIMEs they
      > accept. What I'm not clear on from this document is how I configure
      > Apache to send either text/html or application/xml+xhtml to a browser
      > for the same file based on its accept request.[/color]

      That would involve lying to the browser, which isn't a very good idea. A
      better option would be to have one HTML 4 file and one XHTML file and
      choose which the browser gets based on its Accept header.

      If you have your heart set on lying to the browser, you can use some
      mod_rewrite trickery. See
      <http://www.greytower.n et/en/archive/articles/xhtmlcontent.ht ml>.

      Comment

      • Neal

        #18
        Re: Is the website ok?

        On Mon, 21 Jun 2004 00:37:00 -0400, Leif K-Brooks <eurleif@ecritt ers.biz>
        wrote:
        [color=blue]
        > Neal wrote:[color=green]
        >> On Sun, 20 Jun 2004 22:17:48 -0400, Leif K-Brooks
        >> <eurleif@ecritt ers.biz> wrote:[color=darkred]
        >>> http://httpd.apache.org/docs/content-negotiation.html[/color]
        >>
        >> I'm basically familiar with browsers telling the server what MIMEs they
        >> accept. What I'm not clear on from this document is how I configure
        >> Apache to send either text/html or application/xml+xhtml to a browser
        >> for the same file based on its accept request.[/color]
        >
        > That would involve lying to the browser, which isn't a very good idea. A
        > better option would be to have one HTML 4 file and one XHTML file and
        > choose which the browser gets based on its Accept header.
        >
        > If you have your heart set on lying to the browser, you can use some
        > mod_rewrite trickery. See
        > <http://www.greytower.n et/en/archive/articles/xhtmlcontent.ht ml>.[/color]

        Well, lying to an inanimate object keeps my conscience clear, but writing
        two separate documents/websites makes me a little reluctant...

        I use this precise snippet in my experimentation s. I have yet to implement
        this in an actual live site.

        <?
        if(stristr($HTT P_SERVER_VARS["HTTP_ACCEP T"],"applicatio n/xhtml+xml")){
        header("Content-Type: application/xhtml+xml; charset=UTF-8");
        echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">') ;
        } else {
        header("Content-Type: text/html; charset=UTF-8");
        echo ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
        }
        ?>

        (My server uses an old PHP, as you can tell. $_SERVER would be preferred
        here, obviously.)

        It works like a charm. No problems detected. I'd appreciate a heads up on
        what problems this could create.

        Comment

        • Leif K-Brooks

          #19
          Re: Is the website ok?


          Neal wrote:[color=blue]
          > [Calling XHTML text/html] works like a charm. No problems detected.
          > I'd appreciate a heads up on what problems this could create.[/color]

          A browser which doesn't support XHTML or guzzle tag soup won't be able
          to use your site. IIRC, w3m falls in to this category, but don't quote
          me on that.

          Comment

          • Neal

            #20
            Re: Is the website ok?

            On Mon, 21 Jun 2004 01:29:03 -0400, Leif K-Brooks <eurleif@ecritt ers.biz>
            wrote:
            [color=blue]
            >
            > Neal wrote:[color=green]
            >> [Calling XHTML text/html] works like a charm. No problems detected.
            >> I'd appreciate a heads up on what problems this could create.[/color]
            >
            > A browser which doesn't support XHTML or guzzle tag soup won't be able
            > to use your site. IIRC, w3m falls in to this category, but don't quote
            > me on that.[/color]

            Not familiar with w3m, where is it from? I've tested this on NN4.01
            successfully.

            Comment

            • Chris Morris

              #21
              Re: Is the website ok?

              Leif K-Brooks <eurleif@ecritt ers.biz> writes:[color=blue]
              > Neal wrote:[color=green]
              > > [Calling XHTML text/html] works like a charm. No problems detected.
              > > I'd appreciate a heads up on what problems this could create.[/color]
              >
              > A browser which doesn't support XHTML or guzzle tag soup won't be able
              > to use your site. IIRC, w3m falls in to this category, but don't quote
              > me on that.[/color]

              No, w3m (Neal: http://w3m.sourceforge.net/ - unlike NN4 it's still
              being developed) would cope fine with that.

              --
              Chris

              Comment

              • Chris Morris

                #22
                Re: Is the website ok?

                Neal <neal413@yahoo. com> writes:[color=blue]
                > I use this precise snippet in my experimentation s. I have yet to
                > implement this in an actual live site.
                >
                > <?
                > if(stristr($HTT P_SERVER_VARS["HTTP_ACCEP T"],"applicatio n/xhtml+xml")){
                > header("Content-Type: application/xhtml+xml; charset=UTF-8");
                > echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
                > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">') ;
                > } else {
                > header("Content-Type: text/html; charset=UTF-8");
                > echo ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
                > }
                > ?>
                >
                > It works like a charm. No problems detected. I'd appreciate a heads up
                > on what problems this could create.[/color]

                Accept: text/html, application/xhtml+xml;q=0.1
                Would be sent application/xhtml+xml rather than the preferred text/html

                Accept: text/html, application/xhtml+xml;q=0
                Would be sent application/xhtml+xml despite saying 'never send it'.

                Accept: application/*
                Unusual but possible. Would be incorrectly sent text/html.

                Accept: */*
                Would be sent text/html - not necessarily incorrect.

                --
                Chris

                Comment

                • Dr John Stockton

                  #23
                  Re: Is the website ok?

                  JRS: In article <t6Cdnbm2aY3SME jdRVn-jg@texas.net>, seen in news:comp.i
                  nfosystems.www.authoring.html, Mad Bad Rabbit <madbadrabbit@y ahoo.com>
                  posted at Sun, 20 Jun 2004 10:29:19 :[color=blue]
                  >Dr John Stockton <spam@merlyn.de mon.co.uk> wrote:
                  >[color=green]
                  >> <p>Take a satellite mass <i>m</i>, planet mass <i>M</i>, density
                  >> <i>D</i>, planet radius <i>R</i>, orbit radius <i>R</i> (no
                  >> atmosphere...), period <i>t</i>, angular velocity
                  >> <font face="Symbol">w </font>, gravitational constant <i>G</i>.[/color]
                  >
                  >Why not use the entity &omega; ?[/color]

                  Does not work on my system, which has MSIE4. That is an absolute
                  requirement, since otherwise a wrong but plausible character might be
                  shown elsewhere (I press an incorrect key quite frequently).

                  I cannot recall whether I've viewed such a page on a later browser, but
                  I'm pretty sure I've not seen any such page failing to give the desired
                  characters; not do I recall any report of a problem. If some systems do
                  not handle it as I'd wish, then there is a section of the potential
                  audience that I cannot currently satisfy - just as much as a page
                  written by you containing &omega; would not entirely satisfy me.

                  Actually, IIRC, I don't have any list showing such a form for Greeks;
                  but given that example the rest should be easy to guess.
                  [color=blue]
                  >(also, instead of <i>, why not use <var> to emphasise variables ?)[/color]

                  Mark-up <i> is expected to produce italic. Those are not really
                  variables in the programmer's sense, but algebraic symbols, for which
                  italic is proper. Mark-up <var> happens to give me italic at present,
                  but for programmers' variables I would want what <tt> gives me.

                  [color=blue]
                  >Otherwise, you'll have to look at:
                  >
                  > http://www.unicode.org/charts/
                  > ...[/color]

                  Thanks.


                  --
                  © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
                  Web <URL:http://www.merlyn.demo n.co.uk/> - FAQqish topics, acronyms & links;
                  some Astro stuff via astro.htm, gravity0.htm; quotes.htm; pascal.htm; &c, &c.
                  No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

                  Comment

                  • Dr John Stockton

                    #24
                    Re: Is the website ok?

                    JRS: In article <96bbd0h8bqef4b 3c692iciok5tglb gjifa@4ax.com>, seen in
                    news:comp.infos ystems.www.authoring.html, Steve Pugh <steve@pugh.net >
                    posted at Sun, 20 Jun 2004 16:34:56 :[color=blue]
                    >Dr John Stockton <spam@merlyn.de mon.co.uk> wrote:[/color]
                    [color=blue][color=green]
                    >>I use it frequently as in the last line of[/color][/color]
                    [color=blue][color=green]
                    >> <font face="Symbol">w </font>, gravitational constant <i>G</i>.[/color][/color]
                    [color=blue][color=green]
                    >>in order to get Greeks (absence of simple Greeks seems an omission in
                    >>HTML).[/color]
                    >
                    >Can you explain what you mean by this?[/color]

                    I should possibly have put "original HTML", and stressed "simple".

                    TB-L originated the Web in a technical institution, where Greeks should
                    be greatly needed for names of particles, the SI micro prefix, and
                    general maths. ISTM that it would have been easy enough, for example,
                    to use some keyboard character, possibly \, as an escape for the next
                    character indicating that it meant a corresponding Greek or Maths
                    symbol. That would be simple to use. It could be extended for the
                    better-known Continental languages by saying that if the character after
                    \ is a punctuation character, the meaning is that a corresponding accent
                    is to be intelligently applied to the following letter; e.g. \"a =
                    &auml; and even \-h = Planck's symbol. It would not preclude adding any
                    of the existing wider-range extensions.

                    ( I've used a word processor in which ! was an escape character
                    for italic; perfectly convenient (Greeks were probably
                    impractical in those days))

                    The form that I use for omega is undesirably long; in &#number; the
                    number is not obviously related to the character.

                    [color=blue][color=green]
                    >>The method has the advantage that the selecting character, here
                    >>'w', is generally related in an evident manner to the desired one, here
                    >>'omega'.[/color]
                    >
                    >Do you mean that if the display is totally incapable of showing a
                    >lowercase omega then showing a 'w' is the next best thing?
                    >I'm not sure I agree.[/color]

                    In the context in which I tend to use it, that would be acceptable. But
                    it is not what I meant. I meant that the author can easily relate the
                    double-you of the page source within a Symbol context to the intended
                    Greek meaning omega.

                    [color=blue][color=green]
                    >>How should they be done?[/color]
                    >
                    >&omega; or ω or &#x03C9;[/color]

                    I see in MSIE4 ? or ? or &#x03C9; where ? represents a near-
                    square.

                    [color=blue][color=green]
                    >>With Unicode references such as € (which
                    >>I know is not Greek, and appears unrelated to its meaning)?[/color]
                    >
                    >Um, yes the Euro sign is not Greek, but how is it unrelated to its
                    >meaning?[/color]

                    There is no obvious connection between either the concept Euro or the
                    epsilon-like shape and the number 8364. There would be an obvious
                    connection with a notation such as \=C or \$, or <font
                    face="Currency" >E</font>.

                    --
                    © John Stockton, Surrey, UK. ???@merlyn.demo n.co.uk Turnpike v4.00 MIME. ©
                    Web <URL:http://www.merlyn.demo n.co.uk/> - w. FAQish topics, links, acronyms
                    Dates - miscdate.htm Year 2000 - date2000.htm Critical Dates - critdate.htm
                    Euro computing - eurocash.htm UK Y2k mini-FAQ: y2k_mfaq.txt Don't Mail News

                    Comment

                    • Alan J. Flavell

                      #25
                      Re: Is the website ok?

                      On Mon, 21 Jun 2004, Dr John Stockton wrote:
                      [color=blue][color=green]
                      > >Why not use the entity &omega; ?[/color]
                      >
                      > Does not work on my system, which has MSIE4.[/color]

                      &#number; references for Greek have been working since at least
                      MSIE3.03, maybe earlier. They were certainly working for me back in
                      the days of Win95, once I'd got some decent fonts. (Well, they were
                      working fine in Alis Tango browser on Win/3.1, but that's a bit of a
                      special case).

                      If you aren't seeing it, then something else is wrong. (You've got
                      castrated fonts installed, probably).
                      [color=blue]
                      > That is an absolute requirement,[/color]

                      Illogical. Browsers of that vintage in general did not guarantee to
                      support a character repertoire greater than iso-8859-1. Anything else
                      would be either icing on the cake (if in conformance with published
                      specifications) , or "relying on a bug" - which is what it seems you're
                      determined to do.

                      You really can be stubbornly determined to make a sow's ear out of a
                      silk purse, sometimes.

                      Comment

                      • Uncle Pirate

                        #26
                        Re: Is the website ok?

                        Ganesh J. Acharya wrote:[color=blue]
                        > I now think that I am also a newbie for HTML too. I am thinking of
                        > using XHTML as it is the current standard. But is that a good decision
                        > because I have to soon build a team here rather working the things on
                        > my own. So, I have to keep many things in mind. I am learning to walk
                        > forward keep a enterprise in mind.[/color]

                        I asked on alt.html about HTML vs. XHTML. The gist of the responses
                        seemed to be stick with HTML unless XHTML is needed for content
                        management or other XML related issues. I think I'm going to stick with
                        HTML 4.01 strict on the school's new site.

                        --
                        Stan McCann "Uncle Pirate"
                        Webmaster/Computer Center Manager, NMSU at Alamogordo
                        Cooordinator, Tularosa Basin Chapter, ABATE of NM AMA#758681
                        '94 1500 Vulcan (now wrecked) :( http://surecann.com/Dcp_2068c.jpg
                        A zest for living must include a willingness to die. - R.A. Heinlein

                        Comment

                        • Dr John Stockton

                          #27
                          Re: Is the website ok?

                          JRS: In article <t6Cdnbm2aY3SME jdRVn-jg@texas.net>, seen in news:comp.i
                          nfosystems.www.authoring.html, Mad Bad Rabbit <madbadrabbit@y ahoo.com>
                          posted at Sun, 20 Jun 2004 10:29:19 :[color=blue]
                          >
                          >Here's a list of entities for Greek letters and a few math symbols:
                          >
                          > http://www.htmlhelp.com/reference/ht...s/symbols.html[/color]

                          Exactly the sort of answer I was after. HTML, not PDF, which is quite
                          unnecessary for the purpose.

                          Only four of them work for me; three are of no real use to me, and one
                          was already known (fnof hellip trade; bull).

                          --
                          © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
                          <URL:http://jibbering.com/faq/> JL / RC : FAQ for news:comp.lang. javascript
                          <URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
                          <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

                          Comment

                          • Dr John Stockton

                            #28
                            Re: Is the website ok?

                            JRS: In article <Pine.LNX.4.53. 0406212059560.2 8548@ppepc56.ph .gla.ac.uk[color=blue]
                            >, seen in news:comp.infos ystems.www.authoring.html, Alan J. Flavell[/color]
                            <flavell@ph.gla .ac.uk> posted at Mon, 21 Jun 2004 21:06:59 :[color=blue]
                            >On Mon, 21 Jun 2004, Dr John Stockton wrote:
                            >[color=green][color=darkred]
                            >> >Why not use the entity &omega; ?[/color]
                            >>
                            >> Does not work on my system, which has MSIE4.[/color]
                            >
                            >&#number; references for Greek have been working since at least
                            >MSIE3.03, maybe earlier.[/color]

                            (1) But &omega; is not of the form &#number;.
                            (2) Some numbers, yes. All assigned numbers, not for me.
                            [color=blue]
                            >If you aren't seeing it, then something else is wrong. (You've got
                            >castrated fonts installed, probably).[/color]

                            The installation is as was supplied on behalf of Microsoft.
                            [color=blue][color=green]
                            >> That is an absolute requirement,[/color][/color]

                            Please do not quote without sufficient context.

                            A sufficient quote would have been :
                            Does not work on my system, which has MSIE4. That is an
                            absolute requirement, since otherwise a wrong but plausible
                            character might be shown elsewhere ...
                            [color=blue]
                            >Illogical. Browsers of that vintage in general did not guarantee to
                            >support a character repertoire greater than iso-8859-1. Anything else
                            >would be either icing on the cake (if in conformance with published
                            >specifications ), or "relying on a bug" - which is what it seems you're
                            >determined to do.[/color]

                            Irrelevant. As an author, I insist on being able to read what I am
                            authoring. It is then reasonably certain that the great majority of
                            others see either what I would wish, or the glyph of indeterminacy; that
                            they will not see a plausible, but incorrect, character.

                            --
                            © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Delphi 3 Turnpike 4 ©
                            <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
                            <URL:http://www.bancoems.co m/CompLangPascalD elphiMisc-MiniFAQ.htm> clpdmFAQ;
                            <URL:http://www.borland.com/newsgroups/guide.html> news:borland.* Guidelines

                            Comment

                            • Alan J. Flavell

                              #29
                              Re: Is the website ok?

                              On Tue, 22 Jun 2004, Dr John Stockton wrote:
                              [color=blue]
                              > JRS: In article <Pine.LNX.4.53. 0406212059560.2 8548@ppepc56.ph .gla.ac.uk[color=green]
                              > >, seen in news:comp.infos ystems.www.authoring.html, Alan J. Flavell[/color]
                              > <flavell@ph.gla .ac.uk> posted at Mon, 21 Jun 2004 21:06:59 :[color=green]
                              > >On Mon, 21 Jun 2004, Dr John Stockton wrote:
                              > >[color=darkred]
                              > >> >Why not use the entity &omega; ?
                              > >>
                              > >> Does not work on my system, which has MSIE4.[/color]
                              > >
                              > >&#number; references for Greek have been working since at least
                              > >MSIE3.03, maybe earlier.[/color]
                              >
                              > (1) But &omega; is not of the form &#number;.[/color]

                              Congratulations , you noticed. That's why I tried to recommend (unless
                              you're composing utf-8 in the first place) to use &#number; in
                              preference to &name; , if such &name; entities were defined in HTML4.
                              More details on my web pages, if you finally get around to looking.
                              But you're too busy finding excuses for not following the specs.
                              [color=blue]
                              > (2) Some numbers, yes. All assigned numbers, not for me.
                              >[color=green]
                              > >If you aren't seeing it, then something else is wrong. (You've got
                              > >castrated fonts installed, probably).[/color]
                              >
                              > The installation is as was supplied on behalf of Microsoft.[/color]

                              Microsoft subsequently recommended a free font upgrade, if you're
                              talking about the OS that I think you are.
                              [color=blue]
                              > As an author, I insist on being able to read what I am authoring.[/color]

                              You insist, it seems, on stumbling along with an obsolete system and
                              refusing all pointers to available upgrades. I should have given up
                              sooner, shouldn't I?
                              [color=blue]
                              > that they will not see a plausible, but incorrect, character.[/color]

                              If you persist with your Symbol font bogosity, then users of
                              HTML4-conforming browsers certainly -will- see what you consider to be
                              the incorrect character (e.g they will see "q" where you -intended-
                              theta). With all your consideration for users of obsolete and
                              defective software, don't you care in the least about the users of
                              specification-conforming browsers?

                              EOT for me.

                              --
                              I'm afraid you have fallen into a well-known trap of understanding
                              what is going on here. -Phil Hazel on exim-users

                              Comment

                              • Brian

                                #30
                                Re: Is the website ok?

                                Leif K-Brooks wrote:[color=blue]
                                > Neal wrote:
                                >[color=green]
                                >> if you don't plan to use PHP, there's no way I know of to serve it
                                >> as application/xml+xhtml to some browsers and as text/html to others.[/color]
                                >
                                > http://httpd.apache.org/docs/content-negotiation.html[/color]

                                That's great in principle, but how do you contend with MSIE/Win's
                                accept headers?

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

                                Comment

                                Working...