Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What web browsers do not support Javascript? and how to identify which browser is client using?

are there any web browsers that do not support javascript? and how to identify if client is using one of those browsers? or client has disabled javascript?

like image 728
love Computer science Avatar asked Jun 18 '11 19:06

love Computer science


People also ask

How to find whether a browser supports JavaScript or not?

How to find whether a browser supports JavaScript or not? To find whether the browser supports JavaScript or nor, use the <noscript> tag. The HTML <noscript> tag is used to handle the browsers, which do recognize <script> tag but do not support scripting.

Which web browsers support Java scripts?

Most web browser do support Java Script including one found in mobile phones. Few priority ones which you may find on your TV or car entertainment system may not have it. Javascript is mainly built for browsers.

Why is JavaScript not working in my Web browser?

However, in a browser that supports JavaScript, the user may choose to disable it. This means that the scripts on your site will not be executed. Most web browser do support Java Script including one found in mobile phones.

How to test clients that do not support JavaScript?

Step one: use <noscript> for providing alternate content to clients that do not support javascript. Then test whether the client supports the feature you would like to use. Never test if IE8 or FF3 or something else, ...


2 Answers

are there any web browsers that do not support javascript?

Of course. Lynx is just one example.

and how to identify if client is using one of those browsers?

Using the <noscript> tag to provide alternate content.

or client has disabled javascript?

Same answer as previous : using the <noscript> tag.

You should never test if a client is using X or Y browser. Always perform feature detection. Step one: use <noscript> for providing alternate content to clients that do not support javascript. Then test whether the client supports the feature you would like to use. Never test if IE8 or FF3 or something else, ...

Modernizr is an excellent framework which could aid you with this. So if you want to use some of the new cool HTML5 features, don't test if the browser is such and such version: test if the browser supports the feature you would like to use.

like image 56
Darin Dimitrov Avatar answered Nov 19 '22 21:11

Darin Dimitrov


As if you will working with CSS :

Many adding no-js class in <html> tag like..

<html class="no-js">

and they do replace no-js to js by javascript later, like..

<script>
    document.documentElement.className = document.documentElement.className.replace('no-js','js');
</script>

So when client has disabled javascript.

Example use :

HTML :

<div class="test">This box with some JS function</div>

CSS :

.no-js .test {display:none;}

Hide this box, when client has disabled javascript.

or..

HTML :

<div class="alert">Please, turn you JS on!</div>

CSS :

.js .alert {display:none;}

Hide alert box when JS is on. But still show when JS if off..

Or do something many more... with no-js or js classes..

If your looking for HTML tag for detection :

just <noscript></noscript>as another say

like image 21
l2aelba Avatar answered Nov 19 '22 21:11

l2aelba