I talked with a friend about users who do not have javascript in the browser, and what can be done to show them the "no javascript" version of your site.
Is this possible and how can this be done?
Thoughts?
Do not try to create separate JS versions and non-JS versions of the site. Build a non-JS version, and then upgrade it with JS . This simplifies code reuse, allows the use of object / function detection for the entire stack, and makes it less likely that users without JavaScript will be left if developers update one branch of the site, but not the other.
If you mean javascript, find the <noscript>HTML tag .
<noscript>
JavaScript , , :
<script type="text/javascript"> location.replace('http:javascript-version-of-your-site'); </script>
:
<html> <head> <noscript> <meta http-equiv="refresh" content="0;url=http://foo/noscript.htm" /> </noscript> </head> <body> ...
( ) , script. , noscript , javascript. , javascript ( ), .
JavaScript CSS
<html> <style type="text/css"> .js-on { display: none; } .js-off { background: red; color: White; } </style> <div id='jsdetect' class='js-off'><b>Javascript is OFF</b></div> <script type="text/javascript"> document.getElementById('jsdetect').className = 'js-on'; </script> </html>
, - , Javascript .
// , JavaScript .
<noscript> // Do Something </noscript>
Another option that is open to you, and not with the obvious noscript tag, is to use JavaScript to remove the cookie, and then check that cookie and deliver the content accordingly. javascript ver vs non redirect or span
just thought i would drop it there.
Source: https://habr.com/ru/post/1747787/More articles:display image and run script for fifteen seconds - javascriptНесколько LIKE в SQL - mysqlRegex to get numeric URL parameter value? - urlАлгоритм машинного обучения для одноранговых узлов - algorithmHow to encode RGB images to H264 frames (Keyframe + some dependent frames)? - c #C ++: equivalent to Chr () and unichr ()? - c ++Customizing WCF Binding Custom Behavior Using a .config File - Why Doesn't It Work? - wcfGet all characters from a string with their number - javaHow to save images when multiple sizes are needed? - phpDeploying an ASP.Net MVC Application - databaseAll Articles