Do viewers have JavaScript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mason A. Clark

    Do viewers have JavaScript?

    I am making a page that will depend on JavaScript.
    Is this a problem: the viewers' browser not
    running JavaScript?

    I did a quick survey of the top of one list of
    Top 500 web sites in popularity -- my javascript
    turned off. Almost no problem in simply viewing
    the pages but I did *not* test any dynamics.

    JavaScript was used for some purpose on almost
    all the pages. Only two out of thirty explicitly
    demanded that javascript be turned on.

    QUESTION: Am I running any risk with a page that
    *depends* on javascript for informative pop-up
    windows?

    Mason C
  • Jukka K. Korpela

    #2
    Re: Do viewers have JavaScript?

    Mason A. Clark <masoncNOT@THIS ix.netcom.comQQ Q> wrote:
    [color=blue]
    > QUESTION: Am I running any risk with a page that
    > *depends* on javascript for informative pop-up
    > windows?[/color]

    Yes, starting from the fact that even if JavaScript is enabled, the
    browser might have been configured not to open pop-up windows.
    Even Google toolbar does that. However this depends on _how_ you try to
    create pop-up windows.

    Any _automatic_ pop-up windows will make lots of people leave your site
    and will be prevented by many programs and settings.

    An _optional_ pop-up window, i.e. a link that opens in a new window, is
    less risky and can be fairly safe if you first create a normal link,
    with href="...", and then add the JavaScript code that overrides normal
    link processing and opens a new window with specific properties. But
    then you would also need to check whether new windows are allowed in
    JavaScript (if(window.open ) ...). Even then, some pop-up prevention
    might hit you.

    Do you really think you need pop-up windows so badly? What's wrong with
    being just informative: include the information onto the page itself,
    or behind a link on another page.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

    Comment

    • Bart Lateur

      #3
      Re: Do viewers have JavaScript?

      Mason A. Clark wrote:
      [color=blue]
      >QUESTION: Am I running any risk with a page that
      >*depends* on javascript for informative pop-up
      >windows?[/color]

      IMO yes. I think your pages should be *enhanced* with Javascript, but
      somehow still work with Javascript turned off. With Javascript turned
      off, an extra roundtrip to the server would be needed while with client
      side Javascript it can be handled client side without the round trip.

      For example, take an expanding/collapsing outline menu. With Javascript
      enabled, you can just show/hide subsections with CSS and switching
      classes with Javascript, while without Javascript, the server should
      show the partially expanded sections, and clicking on such a link would
      reload a slightly modified page to show or hide a subsection. I hope I
      make some sense.

      --
      Bart.

      Comment

      • Lachlan Hunt

        #4
        Re: Do viewers have JavaScript?

        Mason A. Clark wrote:[color=blue]
        > I am making a page that will depend on JavaScript.
        > Is this a problem: the viewers' browser not
        > running JavaScript?[/color]

        Yes, if the page *depends* on JavaScript, then it will likely not remain
        accessible to any browser without JavaScript support.
        [color=blue]
        > I did a quick survey of the top of one list of
        > Top 500 web sites in popularity -- my javascript
        > turned off. Almost no problem in simply viewing
        > the pages but I did *not* test any dynamics.[/color]

        Then, based on that statement, those sites did not *depend* on
        javascript, but merely used it to enhance the site. JavaScript should
        always be used in a way that benefits those with javascript support, but
        does not negatively affect those without.
        [color=blue]
        > JavaScript was used for some purpose on almost
        > all the pages. Only two out of thirty explicitly
        > demanded that javascript be turned on.[/color]

        Such practices are evil for the very reason such messages appear. If
        you visited my site and I demanded that you configure *your* browser the
        way *I* liked, would you really stick around for more?
        [color=blue]
        > QUESTION: Am I running any risk with a page that
        > *depends* on javascript[/color]

        Yes. You will either turn away or at least annoy a fraction of your
        users by requireing JavaScript to be enabled for some features to be
        accessible.
        [color=blue]
        > for informative pop-up windows?[/color]

        You will annoy even more users by using popup windows.

        You should read this brief tutorial about how and why you should use
        unobtrusive javascript. I don't know if it will contain any material to
        address your particular requirements, but it does contain a very good
        overview of good scripting practices.


        --
        Lachlan Hunt

        http://GetFirefox.com/ Rediscover the Web
        http://GetThunderbird.com/ Reclaim your Inbox

        Comment

        • phil_gg04@treefic.com

          #5
          Re: Do viewers have JavaScript?

          > Am I running any risk with a page that[color=blue]
          > *depends* on javascript for informative pop-up
          > windows?[/color]

          As others have said it is best to not depend on Javascript and things
          like

          <a href="foo" onclick="openfo owindow(); return false;">...

          mean that you can normally offer a fallback with little pain. Also
          look up <NOSCRIPT> if you don't know about it. I have this:

          <noscript>
          <link rel="stylesheet " type="text/css" src="noscript.c ss">
          </noscript>

          in the header, which allows me to display:none the bits of the page
          that rely on scripts. Note that this NOT legitimate HTML but either
          works or is ignored by all the browsers that I've seen. (Any comments
          anyone?)

          How many of your visitors will be inconvenienced because you reply on
          Javascript does depend on the type of site that it is and the
          demographics of the visitors. By coincidence this morning I have been
          plotting some graphs of this sort of thing for one of my sites and I've
          been suprised to find that not a single user has Javascript disabled!
          It's well worth doing a study like this because the results might not
          be what you were expecting or what others told you. For example,
          although the effort that I've put into making the site work when JS is
          disabled may be partly wasted[*], I've also found that users have much
          smaller screens than I expected. Only a tiny fraction seem to have a
          1280x1024 monitor (and practically all of them are Mac users) with more
          than a third using a window smaller than 900x500! Of course the site
          is fluid enough to work in these small windows, but they weren't what I
          had in mind when I designed it. Your visitors will probably be
          different, so I encourage you to measure them.
          [*] Of course the largest category of visitors who don't have JS
          enabled are search engines, and making sure that they can reach all of
          the content is important.

          <RANT>As for pop-up windows, forget them. In the way that spam has
          ruined email, popups are ruined by their use for advertising. Don't
          design a site that relies on users doing things by email: too many of
          them will give bogus email addresses because they're afraid of spam, or
          they'll have whitelist-based filtering so your message (containing
          their new password for your site or whatever) will never reach them, or
          it will reach them but they'll have forgotten that they signed up and
          report you to someone who'll blacklist you. The same applies to
          popups: you may think that a popup is the right thing to use, and I
          might agree in principle, but the whole concept is now so tarnished in
          users' minds that you might as well be selling penis-pills. Your
          friendly popup message saying "Are you sure you want to close, you
          haven't saved it?" will get trapped and converted into "THIS NASTY SITE
          TRIED TO OPEN AN OBNOXIOUS ADVERT FOR PENIS PILLS WOULD YOU LIKE TO
          COMPLAIN ABOUT THEM TO THE FTC???" by the user's browser.
          Aaarrrgghh!!!!</RANT>

          --Phil.

          Comment

          • me

            #6
            Re: Do viewers have JavaScript?

            "Mason A. Clark" <masoncNOT@THIS ix.netcom.comQQ Q> wrote in message
            news:844o21lddf lpppds9ods144ri r888hv5om@4ax.c om...[color=blue]
            > I am making a page that will depend on JavaScript.
            > Is this a problem: the viewers' browser not
            > running JavaScript?
            >
            > I did a quick survey of the top of one list of
            > Top 500 web sites in popularity -- my javascript
            > turned off. Almost no problem in simply viewing
            > the pages but I did *not* test any dynamics.
            >
            > JavaScript was used for some purpose on almost
            > all the pages. Only two out of thirty explicitly
            > demanded that javascript be turned on.
            >
            > QUESTION: Am I running any risk with a page that
            > *depends* on javascript for informative pop-up
            > windows?
            >
            > Mason C[/color]

            I see no reason not to use JavaScript but I would not use windows that popup
            automatically via JavaScript. Popup windows are IMO persona non grata to
            most users. If you fear that some users may not be able to access items in
            your pages that depend on JavaScript then use the following tag directly
            below the JavaScript to alert them to this possibility:
            Good Luck,
            me

            <NOSCRIPT>Thi s will not work without JavaScript enabled. Please enable
            JavaScript, thank you!</NOSCRIPT>


            Comment

            • Stan Brown

              #7
              Re: Do viewers have JavaScript?

              "Mason A. Clark" wrote in comp.infosystem s.www.authoring.html:[color=blue]
              >I am making a page that will depend on JavaScript.
              >Is this a problem: the viewers' browser not
              >running JavaScript?[/color]

              Yes, it's a problem.

              It's one thing to make a page where the experience is enhanced with
              Javascript. But to make it _depend_ on Javascript is a really bad
              idea.

              You say you visited some popular sites and they looked okay. The #1
              misuse of Javascript, in my opinion, is in navigation. if you tried
              navigating thoise sites without Javascript you would have found
              some of them entirely unusable because the clueless Web dee-zigh-
              nurrs required Javascript.

              Here's a typically egregious example:

              The links do in fact have href= attributes, but they don't work
              because he depends on Javascript rewriting them on the fly. Or
              something. Net effect: an unusable site, and inaccessible
              information.

              (This URL was posted in a Windows XP help group. I did draw the
              problem to the page author's attention.)

              It's particularly disappointing that so many people go out of their
              way to create contrtions like this. In effect, they spend massive
              amounts of effort to make their sites less usable. "Oh, what fools
              these mortals be!"

              --

              Stan Brown, Oak Road Systems, Tompkins County, New York, USA

              Comment

              • Lachlan Hunt

                #8
                Re: Do viewers have JavaScript?

                me wrote:[color=blue]
                > <NOSCRIPT>Thi s will not work without JavaScript enabled. Please enable
                > JavaScript, thank you!</NOSCRIPT>[/color]

                If you regularly surfed with JS disabled, do you realise how irritating
                that would get? Why should a user adjust their browser settings to
                match yours in any way whatsoever? Also, noscript is intended to
                provide suitable alternate content for users without JS, not point out
                their limitiations.

                That example is just as bad as:

                <img ... alt="Please turn on images.">

                <noframes>
                <p>Your browser does not support frames, please upgrade to IE 5.</p>
                </noframes>

                --
                Lachlan Hunt

                http://GetFirefox.com/ Rediscover the Web
                http://GetThunderbird.com/ Reclaim your Inbox

                Comment

                • Richard Cornford

                  #9
                  Re: Do viewers have JavaScript?

                  Lachlan Hunt wrote:[color=blue]
                  > me wrote:[color=green]
                  >> <NOSCRIPT>Thi s will not work without JavaScript enabled.
                  >> Please enable JavaScript, thank you!</NOSCRIPT>[/color]
                  >
                  > If you regularly surfed with JS disabled, do you realise how
                  > irritating that would get? Why should a user adjust their
                  > browser settings to match yours in any way whatsoever? Also,
                  > noscript is intended to provide suitable alternate content for
                  > users without JS, not point out their limitiations.[/color]
                  <snip>

                  The proposal gets even worse when you consider that there are almost no
                  browser scripts that are exclusively dependent on scripting support
                  alone. That is, they almost all require on the browser in question
                  implementing some specific features in its object model. As browser
                  object models differ considerably in what they implement (and are more
                  or less dynamic in how they respond to manipulation of that object
                  model) there is every chance that at least some visitors willing and
                  capable of enabling javascript to view the page will still not
                  experience an actively functional script. Which will make the author of
                  the page look very foolish for making a demand and then not delivering
                  when the visitor satisfies it.

                  Richard.


                  Comment

                  • me

                    #10
                    Re: Do viewers have JavaScript?

                    "Lachlan Hunt" <spam.my.gspot@ gmail.com> wrote in message
                    news:422d0a76$0 $6744$5a62ac22@ per-qv1-newsreader-01.iinet.net.au ...[color=blue]
                    > Why should a user adjust their browser settings to
                    > match yours in any way whatsoever?[/color]

                    Do you think I will adjust my opinion to suit you in any way whatsoever?
                    Signed,
                    me


                    Comment

                    • me

                      #11
                      Re: Do viewers have JavaScript?

                      "Lachlan Hunt" <spam.my.gspot@ gmail.com> wrote in message
                      news:422d0a76$0 $6744$5a62ac22@ per-qv1-newsreader-01.iinet.net.au ...[color=blue]
                      > me wrote:[color=green]
                      > > <NOSCRIPT>Thi s will not work without JavaScript enabled. Please enable
                      > > JavaScript, thank you!</NOSCRIPT>[/color]
                      >
                      > If you regularly surfed with JS disabled, do you realise how irritating
                      > that would get? Why should a user adjust their browser settings to
                      > match yours in any way whatsoever? Also, noscript is intended to
                      > provide suitable alternate content for users without JS, not point out
                      > their limitiations.
                      >
                      > That example is just as bad as:
                      >
                      > <img ... alt="Please turn on images.">
                      >
                      > <noframes>
                      > <p>Your browser does not support frames, please upgrade to IE 5.</p>
                      > </noframes>
                      >
                      > --
                      > Lachlan Hunt[/color]

                      I find it very amusing that on your about page
                      http://lachy.id.au/about/aboutme you list www.thefarmshed.com.au as a site
                      that you "completely redesigned to be standards compliant" (though you do
                      say you're no longer involved with the site).

                      Not only does the Farmshed site use a very annoying JavaScript popup window
                      (on every page) without toolbars or buttons it also uses a decidedly non
                      fluid table based layout. There's also a proprietary tag for an IE Favicon.
                      How frustrated you must be, you have my sympathies. I also found some errors
                      on the Farmshed site too.
                      Signed,
                      me

                      PS: Your site doesn't degrade in IE6, although it does make an attempt to do
                      so when it first loads. :-(


                      Comment

                      • Michael  Hamm

                        #12
                        Re: Do viewers have JavaScript?

                        Yesterday, phil_gg04@treef ic.com <phil_gg04@tree fic.com> wrote, in part:[color=blue]
                        > look up <NOSCRIPT> if you don't know about it. I have this:
                        >
                        > <noscript>
                        > <link rel="stylesheet " type="text/css" src="noscript.c ss">
                        > </noscript>
                        >
                        > in the header, which allows me to display:none the bits of the page
                        > that rely on scripts. Note that this NOT legitimate HTML but either
                        > works or is ignored by all the browsers that I've seen. (Any comments
                        > anyone?)[/color]

                        I'd say it's better to use the script to write itself instead of relying
                        no-script browsers' using CSS.

                        In one page, I have something like

                        <style type="text/css">div{displa y:none}</style>
                        <script type="text/javascript"><!--
                        function n(){document.ge tElementsByTagN ame("style")[0].disabled=true; };
                        document.write( '<a href="#n" id="n" onclick="n()">S ee [foo].<\/a>');
                        //--></script>

                        Of course, what I have is no solution if it's essential that [foo] be
                        hidden until the user wants to see it. After all, it won't work in a no-
                        script browser, nor in a no-style browser, and it totally fails in a
                        no-script, yes-style browser. It's no solution, except that this page has
                        a readership of eight, all of whom are in contact with me. But I think
                        it's cleaner than your idea. And my idea *will* be a solution for some
                        desired results (just not for mine: hiding things on a page so the user
                        can display them at will).

                        Michael Hamm
                        AM, Math, Wash. U. St. Louis
                        msh210@math.wus tl.edu Fine print:
                        http://math.wustl.edu/~msh210/ ... legal.html

                        Comment

                        • Stan Brown

                          #13
                          Re: Do viewers have JavaScript?

                          "me" wrote in comp.infosystem s.www.authoring.html:[color=blue]
                          >Do you think I will adjust my opinion to suit you in any way whatsoever?[/color]

                          "There are none so blind as thos who _will_ not see."

                          "You can lead a Usnetter to knowledge, but you cannot make him
                          think."

                          --

                          Stan Brown, Oak Road Systems, Tompkins County, New York, USA

                          Comment

                          • me

                            #14
                            Re: Do viewers have JavaScript?

                            "Stan Brown" <the_stan_brown @fastmail.fm> wrote in message
                            news:3978snF5uo jqsU8@individua l.net...
                            [snip]

                            After reviewing your last 15 posts I can see only two that I could in anyway
                            interpret as slightly helpful. If you had knowledge to share or even
                            something interesting to say I might listen next time. Instead of offering
                            criticisms why not try helping someone? If you did help someone sometime you
                            might be able to justify your presence here.
                            Signed,
                            me



                            Comment

                            • Harlan Messinger

                              #15
                              Re: Do viewers have JavaScript?

                              me wrote:[color=blue]
                              > "Lachlan Hunt" <spam.my.gspot@ gmail.com> wrote in message
                              > news:422d0a76$0 $6744$5a62ac22@ per-qv1-newsreader-01.iinet.net.au ...
                              >[color=green]
                              >>Why should a user adjust their browser settings to
                              >>match yours in any way whatsoever?[/color]
                              >
                              >
                              > Do you think I will adjust my opinion to suit you in any way whatsoever?[/color]

                              I tend to have greater respect for people who adjust their opinions when
                              presented with new perspectives that should provide the motivation for
                              doing so, and less respect for people whose opinions are fixed because,
                              in their view, "they're *my* opinions, dammit, and I'm not changin' them
                              for you or any person alive--and the facts are besides the point".

                              Comment

                              Working...