What if javascript is disabled by the client?

My site is heavily dependent on Javascript, and if I turn it off, my site looks really ugly.

I want to force the user to use Javascript by showing him a notification in order to enable it, otherwise ask him not to see the site.

What should I do for this?

+6
javascript
source share
6 answers
<script type="text/javascript"> document.write("Hello World!") </script> <noscript> Your browser does not support JavaScript! </noscript> 

Also, feel free to use the β€œhtml script google tag” and see http://www.w3schools.com/tags/tag_noscript.asp

+3
source share

Look at here:

noscript tag

All you can do is check if javascript is enabled or not and show a notification that the site is best viewed with javascript enabled.

+5
source share

According to your question:
By default, you will see a notification, and using JS + some kind of document / DOM Ready, just delete the notification. Try not to do this in the / onload window, because then you will see a notification until ALL resources of this page, which take more time than the house, are loaded. Thus, everyone who does not have JS will get a message.

But ideally, you just want to have a site that works with or without javascript. Perhaps unobtrusive javascript is a nice search term for you.

+2
source share

I watched an interesting conversation by John Resig (JQuery Creator), and he even mentions in his video, don't rely on Javascript.

+2
source share

First of all, be warned that forcing the user to do something is usually considered rather rude. Many people leave javascript either completely disabled or strictly limited, because some twerp wanted to use it to get them to do something or see something.

With that said, you can add text to the <noscript></noscript> tags. This text will only be displayed if the browser does not have javascript or it is disabled.

+2
source share

A landing page is created with the <noscript> tag to inform the user that your website is not working without Javascript. Then you go and pray $ DEITY for forgiveness, because you added to the common ant pool, which is the network.

0
source share

All Articles