Handling browsers with Javascript turned off: W3C way?

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

    #91
    Re: Handling browsers with Javascript turned off: W3C way?

    In article <4e9c40c6.04021 30251.4c4dbe6e@ posting.google. com>,
    retlak@go.com (Retlak) wrote:
    [color=blue]
    > The recommended (on dozens of websites) and effective (works in
    > Netscape, MSIE, Mozilla, probably others) way to detect if a browser
    > has Javascript turned off is to put this in the <head>:
    >
    > <noscript>
    > <meta http-equiv="refresh"
    > content="1;url= http://yourURL/nojscript.html" >
    > </noscript>
    >
    > This redirects to a doc which typically says "You need to enable
    > Javascript".[/color]

    Put that statement in the Noscript tag. Simple enough.

    Also given that what you're using the script for is nonessential
    (pre-submission validation of form data) you should allow users to be
    ornery and contrary and use your document with javascript off. In some
    situations users are not able to turn javascript on (i.e. in a workplace
    with restrictive security settings) and you should certainly be doing
    validation of data on the server as well as the client.

    --
    | Andrew Glasgow <amg39(at)corne ll.edu> |
    | "Provide me with ships or proper sails for the celestial atmosphere and |
    | there will be men there, too, who do not fear the appalling distance" |
    | -- Johannes Kepler |

    Comment

    • Andrew Glasgow

      #92
      Re: Handling browsers with Javascript turned off: W3C way?

      In article <4e9c40c6.04021 50238.942ac62@p osting.google.c om>,
      retlak@go.com (Retlak) wrote:
      [color=blue]
      > Brian <usenet3@juliet remblay.com.inv alid-remove-this-part> wrote in message
      > news:<%gqXb.356 13$uV3.59311@at tbi_s51>...
      >[color=green]
      > > Do it correctly.
      > >
      > > http://www.xs4all.nl/~sbpoley/webmatters/formval.html[/color]
      >
      > My dictionary does not define the word "correctly" to mean "as
      > advocated by Stephen Poley".
      >
      > I don't want people who disable javascript to see any of my website
      > content, except for a page telling them why they can't see that
      > content. You (and Stephen Poley, if you're not the same person)
      > advocate some other policy. That has little relevance to the original
      > technical question.[/color]

      There's no good reason to do that, however.

      --
      | Andrew Glasgow <amg39(at)corne ll.edu> |
      | "The ordinary telegraph is like a very long cat. You pull the tail in New |
      | York, and it meows in Los Angeles. The wireless is the same, only without |
      | the cat." -- Albert Einstein |

      Comment

      • Andrew Glasgow

        #93
        Re: Handling browsers with Javascript turned off: W3C way?

        In article <4e9c40c6.04021 30708.1f629efd@ posting.google. com>,
        retlak@go.com (Retlak) wrote:
        [color=blue]
        > Kris <kristiaan@xs4a ll.netherlands> wrote in message
        > news:<kristiaan-284609.12152213 022004@newszill a.xs4all.nl>...[color=green]
        > > In article <4e9c40c6.04021 30251.4c4dbe6e@ posting.google. com>,
        > > retlak@go.com (Retlak) wrote:
        > >[/color]
        >[color=green][color=darkred]
        > > >
        > > > This redirects to a doc which typically says "You need to enable
        > > > Javascript".[/color]
        > >
        > > What is the use of that? You mean, you have built your website dependant
        > > on an optional browserfeature? Pity.
        > >[/color]
        >
        > In practical terms, Javascript is not really an "optional feature".
        > More than 70% of all web sites require Javascript (no, I can't
        > remember a URL). Realistically, you need to enable Javascript to do
        > anything on the web. AFAIK all browsers except Lynx have supported
        > Javascript since the 1990s.[/color]

        70% or more of pages may *use* javascript but I sincerely doubt that
        anywhere near that number *require* javascript.

        --
        | Andrew Glasgow <amg39(at)corne ll.edu> |
        | "I have never made but one prayer to God, a very short one: 'O Lord, make |
        | my enemies ridiculous.' And God granted it." -- Voltaire |

        Comment

        • Andy Dingley

          #94
          Re: Handling browsers with Javascript turned off: W3C way?

          On Sun, 15 Feb 2004 10:17:31 -0600, Mad Bad Rabbit
          <madbadrabbit@y ahoo.com> wrote:
          [color=blue]
          >Note that this won't hide your content from Netscape 4 users;[/color]

          Screw them. I'll build workarounds for most things, but not NS4.

          Anyway, most NS4 machines don't work because the users keep throwing
          wooden shoes in the keyboard.


          Comment

          • Andy Dingley

            #95
            Re: Handling browsers with Javascript turned off: W3C way?

            On Sun, 15 Feb 2004 11:41:19 +0000, "Alan J. Flavell"
            <flavell@ph.gla .ac.uk> wrote:
            [color=blue]
            >If you want to make something depend on JS, then do
            >it with JS alone - don't involve other things that might be optional.[/color]

            Life sucks, adoption of web standards particularly so.

            In this worst case, someone with JS & no CSS will see a potentially
            confusing message that their JS appears to be turned off when it's
            actually working. This is such an aberrant case I'm really not going
            to worry about it. If you did care, then I'm sure there's an even
            cleverer JS fix to detect CSS failing and work around on the basis of
            that.

            I wouldn't place the display:none; into an external stylesheet, just
            in case there was a network issue that stopped it loading, but I
            wouldn't worry beyond that.


            I'm concerned about users without JS, mainly those who are trying to
            avoid popups. I code rollovers with CSS, not JS. I link thumbnail
            viewers through an <a> with both JS and a href & target="_foo" as a
            backup. I'm trying hard to support those that have chosen to switch
            off JS, but those without CSS alone just aren't even on my radar.

            --
            Smert' spamionam

            Comment

            • Retlak

              #96
              Re: Handling browsers with Javascript turned off: W3C way?

              Andrew Glasgow <amg39@cornell. edu> wrote in message news:<amg39-75A95C.13543715 022004@news.ver izon.net>...[color=blue]
              > In article <4e9c40c6.04021 30251.4c4dbe6e@ posting.google. com>,
              > retlak@go.com (Retlak) wrote:
              >[color=green]
              > > The recommended (on dozens of websites) and effective (works in
              > > Netscape, MSIE, Mozilla, probably others) way to detect if a browser
              > > has Javascript turned off is to put this in the <head>:
              > >
              > > <noscript>
              > > <meta http-equiv="refresh"
              > > content="1;url= http://yourURL/nojscript.html" >
              > > </noscript>
              > >
              > > This redirects to a doc which typically says "You need to enable
              > > Javascript".[/color]
              >
              > Put that statement in the Noscript tag. Simple enough.[/color]

              It doesn't solve the problem as stated, because it displays
              non-working elements (which rely on javascript) to the user. (as
              already pointed out to others who made the same suggestion; didn't you
              read the thread?)
              [color=blue]
              > Also given that what you're using the script for is nonessential
              > (pre-submission validation of form data)[/color]

              If you'd bothered to read the thread, you'd have seen that that's only
              one of the things I am using javascript for. Nowhere did I write it's
              the only use. And of course it isn't. But even if it were:
              [color=blue]
              > you should allow users to be
              > ornery and contrary and use your document with javascript off.[/color]

              I'll make my own decisions about whether I encourage wasteful use of
              my website resources. You don't have enough information to do that.
              [color=blue]
              > In some
              > situations users are not able to turn javascript on (i.e. in a workplace
              > with restrictive security settings)[/color]

              Their problem, not mine.
              [color=blue]
              > and you should certainly be doing
              > validation of data on the server as well as the client.[/color]

              If you'd bothered to read the thread you'd have seen that I am doing
              validation on the server, so this comment is pointless as well.

              Comment

              • Alan J. Flavell

                #97
                Re: Handling browsers with Javascript turned off: W3C way?

                On Mon, 15 Feb 2004, Retlak wrote:
                [color=blue]
                > I'll make my own decisions about whether I encourage wasteful use of
                > my website resources.[/color]

                You don't really have any use for public discussion, do you?
                [color=blue]
                > You don't have enough information to do that.[/color]

                Quite right, and the best way to deal with that is what I'm going to
                do now. I don't know why I waited so long.

                Comment

                • Brian

                  #98
                  Re: Handling browsers with Javascript turned off: W3C way?

                  Retlak wrote:[color=blue]
                  >
                  > I'll make my own decisions about whether I encourage wasteful use
                  > of my website resources. You don't have enough information to do
                  > that.[/color]
                  [...][color=blue]
                  > If you'd bothered to read the thread you'd have seen that I am
                  > doing validation on the server, so this comment is pointless as
                  > well.[/color]

                  Welcome to usenet, which is not your helpdesk. If someone thinks what
                  you're doing is a bad idea, he'll tell you so, whether you want him to
                  or not.

                  --
                  Brian (follow directions in my address to email me)


                  Comment

                  • Kris

                    #99
                    Re: Handling browsers with Javascript turned off: W3C way?

                    In article <4e9c40c6.04021 51635.8c55507@p osting.google.c om>,
                    retlak@go.com (Retlak) wrote:
                    [color=blue][color=green]
                    > > Put that statement in the Noscript tag. Simple enough.[/color]
                    >
                    > It doesn't solve the problem as stated, because it displays
                    > non-working elements (which rely on javascript) to the user. (as
                    > already pointed out to others who made the same suggestion; didn't you
                    > read the thread?)[/color]

                    Index page:
                    - javascript redirect to application pages
                    - noscript section explaining stuff
                    - Google bait
                    - link to application pages for visitors to follow manually if
                    they choose so

                    This way, if JS is unavailable, no harm is done.

                    --
                    Kris
                    <kristiaan@xs4a ll.netherlands> (nl)
                    <http://www.cinnamon.nl/>

                    Comment

                    • Retlak

                      Re: Handling browsers with Javascript turned off: W3C way?

                      Brian <usenet3@juliet remblay.com.inv alid-remove-this-part> wrote in message news:<Xg_Xb.419 16$jk2.100229@a ttbi_s53>...[color=blue]
                      > Retlak wrote:[color=green]
                      > >
                      > > I'll make my own decisions about whether I encourage wasteful use
                      > > of my website resources. You don't have enough information to do
                      > > that.[/color]
                      > [...][color=green]
                      > > If you'd bothered to read the thread you'd have seen that I am
                      > > doing validation on the server, so this comment is pointless as
                      > > well.[/color]
                      >
                      > Welcome to usenet, which is not your helpdesk. If someone thinks what
                      > you're doing is a bad idea, he'll tell you so, whether you want him to
                      > or not.[/color]

                      You're absolutely right, of course. I should get used to it, and not
                      get irritated by the blatherers who continue to post garbage long
                      after a really good solution to the problem has been posted by
                      somebody else. Two people posted really useful suggestions, one of
                      them also pointed out an error in my HTML, a couple of others probably
                      tried to help. The other (approximately) 12 people who posted
                      contributed nothing. But that's probably a better than average
                      signal-to-noise ratio for Usenet. I should be grateful, and in fact I
                      am.

                      Comment

                      • Brian

                        Re: Handling browsers with Javascript turned off: W3C way?

                        Retlak wrote:[color=blue]
                        > Brian wrote in message news:<Xg_Xb.419 16$jk2.100229@a ttbi_s53>...[color=green]
                        >>
                        >> Welcome to usenet, which is not your helpdesk. If someone thinks
                        >> what you're doing is a bad idea, he'll tell you so, whether you
                        >> want him to or not.[/color]
                        >
                        > You're absolutely right, of course. I should get used to it, and
                        > not get irritated by the blatherers who continue to post garbage
                        > long after a really good solution to the problem has been posted by
                        > somebody else.[/color]

                        You apparently didn't get the message. This is not a helpdesk, it is a
                        discussion forum.
                        [color=blue]
                        > Two people posted really useful suggestions, one of them also
                        > pointed out an error in my HTML, a couple of others probably tried
                        > to help. The other (approximately) 12 people who posted contributed
                        > nothing. But that's probably a better than average signal-to-noise
                        > ratio for Usenet.[/color]

                        The ratio will get worse for you if you continue to act boorishly.
                        Ever heard of killfile?
                        [color=blue]
                        > I should be grateful, and in fact I am.[/color]

                        You don't sound it to me.

                        --
                        Brian (follow directions in my address to email me)


                        Comment

                        • Jim Ley

                          Re: Handling browsers with Javascript turned off: W3C way?

                          On 14 Feb 2004 02:25:48 -0800, retlak@go.com (Retlak) wrote:
                          [color=blue]
                          >Darin McGrew <mcgrew@stanfor dalumni.org> wrote in message news:<c0j6ji$tc 7$2@blue.rahul. net>...[color=green]
                          >> Retlak <retlak@go.co m> wrote:[color=darkred]
                          >> > The recommended (on dozens of websites) and effective (works in
                          >> > Netscape, MSIE, Mozilla, probably others) way to detect if a browser
                          >> > has Javascript turned off is to put this in the <head>:
                          >> >
                          >> > <noscript>
                          >> > <meta http-equiv="refresh"
                          >> > content="1;url= http://yourURL/nojscript.html" >
                          >> > </noscript>[/color]
                          >>
                          >> And what if the META refresh hack is disabled/unsupported?[/color]
                          >
                          >Do you know of environments in which it is unsupported? How can it be
                          >disabled?[/color]

                          IE and Opera (and I imagine FireFox and the mozilla families now, but
                          not recently checked) both allow you to block meta refreshes
                          automatically.

                          Just check your preferences for it.

                          Jim.
                          --
                          comp.lang.javas cript FAQ - http://jibbering.com/faq/

                          Comment

                          • Jim Ley

                            Re: Handling browsers with Javascript turned off: W3C way?

                            On Sat, 14 Feb 2004 20:37:17 +0000, Andy Dingley
                            <dingbat@codesm iths.com> wrote:
                            [color=blue]
                            >On Sat, 14 Feb 2004 18:01:01 +0100, Bertilo Wennergren
                            ><bertilow@gmx. net> wrote:
                            >[color=green]
                            >>There is no such thing. Instead you generate the entire JavaScript
                            >>dependant part with JavaScript ("document.writ e", DOM stuff ...).[/color]
                            >
                            >I do this regularly, but you don't need to document.write( ) the whole
                            >thing - just set it as static HTML with CSS display: none; then change
                            >the display mode with JavaScript.[/color]

                            Ooops, making the assumption that CSS and javascript go together,
                            that's not safe!

                            Jim.
                            --
                            comp.lang.javas cript FAQ - http://jibbering.com/faq/

                            Comment

                            • Andy Dingley

                              Re: Handling browsers with Javascript turned off: W3C way?

                              On Wed, 18 Feb 2004 13:42:31 GMT, jim@jibbering.c om (Jim Ley) wrote:
                              [color=blue]
                              >Ooops, making the assumption that CSS and javascript go together,
                              >that's not safe![/color]

                              I'm not assuming that they "go together", I'm assuming that the set of
                              users with of (JS && !CSS) is insignificant. The other cases work and
                              I don;t expect that many people will have in-line CSS disabled, yet
                              leave JS enabled.

                              --
                              Smert' spamionam

                              Comment

                              • Brian

                                Re: Handling browsers with Javascript turned off: W3C way?

                                Jim Ley wrote:[color=blue]
                                >
                                > IE and Opera (and I imagine FireFox and the mozilla families now,
                                > but not recently checked) both allow you to block meta refreshes
                                > automatically.[/color]

                                I don't know that Mozilla/Firefox does allow you to set this pref.
                                I've never come across it myself.

                                --
                                Brian (follow directions in my address to email me)


                                Comment

                                Working...