Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2009
    Location
    NYC (Manhattan)
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Effects of disabled Javascript??

    Quick question...

    What happens if a portion of your page is coded with Javascript and the user viewing your page has Javascript disabled. Will the Javascript simply be ignored and the rest of the page still appear? Or will they run into an error and not see anything at all?

    THANKS!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    The Javascript will simply be ignored but the rest of the page will appear.

    See:-
    http://www.sitepoint.com/blogs/2007/...bled-browsers/


    Quizmaster: What was the date of the Battle of Hastings?
    Contestant: Was it 1974?
    Last edited by Philip M; 07-20-2009 at 06:53 PM.

  • #3
    Regular Coder
    Join Date
    Mar 2008
    Posts
    301
    Thanks
    2
    Thanked 30 Times in 30 Posts
    Quote Originally Posted by easypeasy View Post
    Quick question...

    What happens if a portion of your page is coded with Javascript and the user viewing your page has Javascript disabled.

    THANKS!
    I view websites that way - all the time! If there's a plea to turn on script, or it's obvious that something won't load without, I turn on each script until the page works. I use the addon, NoScript, in Firefox. Many, many people do.

    Even worse - what if the viewer had switched off or substituted their own style sheet?

    It's best to first design the page with both styles and Javascript disabled. Then add styles to get the look and layout. Add Javascript for the behaviors, such as loading this video clip or that. If Javascript is important, you can optionally leave a little message say at the top of the screen that - this site uses Javascript for more advanced features - or some such. You can put it in a noscript tag.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    I have the idea that the average user has no idea how to disable Javascript, or has ever contemplated doing so, nor would have a clue why this might be a good/bad idea.

    According to http://www.w3schools.com/browsers/browsers_stats.asp,
    in January 2000 20% had Javascript disabled, in January 2008 only 5%. But I don't know how reliable these figures are - after all, research has shown that 87.34% of all statistics are simply made up.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •