PDA

View Full Version : Javascript Browser Support



Barryt06
01-30-2012, 06:23 PM
Hi,

I have begun learning Javascript & JQuery over the past few months. I remember years ago when I looked at JS, it wasn't great to use due to lack of JS support on some browsers and it being turned off in settings on others that did support.

Just wondering if there is any issue these days, I know ppl can still turn it off, but I guess with all the sites using JQuery that this isnt as big a deal/issue as it used to be.

Is there a way to place a redundancy for when JS is not enabled?

Barry

jscheuer1
01-30-2012, 07:16 PM
You're right. It's not as big of an issue. Today's browsers all support javascript and almost everyone has it turned on. With jQuery, most differences between browsers' javascript engines are already worked out for you.

For those few without javascript, look for scripts that use ordinary HTML. For example, a menu that uses ordinary links in the markup and transforms them into a cool menu using javascript. Generally with that sort of setup non-javascript users can still see and use the links, it just won't look as fancy. Or an image gallery that takes ordinary img tags from the markup and transforms them into a slideshow or something. Non-javascript users can still see the images.

Sometimes scripts like that come with style that hides the links or images even when javascript is disabled. Often a script like that can be tweaked to allow non-javascript users to see that content.

If you find a script that you really like but it has no built in non-javascript fall back like that, you can always place alternate non-javascript content inside:


<noscript></noscript>

tags.

Barryt06
02-01-2012, 05:38 PM
Thank you very much John. I completely forgot about the noscript tags.

Cheers :)