因此,考虑到以下标记,如果用户浏览器禁用了JavaScript,它们将被重定向到备用页面,该页面试图模拟没有JavaScript(可能是动态呈现的页面)的网站功能,或者一个警告页面,通知必须启用JavaScript使用网站将JavaScript禁用的用户重定向
<!doctype html>
<html>
<head>
<!-- If the browser has javascript disabled, the browser will be redirected-->
<!-- to a page that does not require javascript to function, or informs the-->
<!-- the user of the requirement for javascript to be enabled-->
<noscript>
<meta http-equiv="refresh" content="5; url=/warning.html"/>
</noscript>
<title>
Page Title
</title>
</head>
<body>
<script>
// rich client logic
</script>
</body>
</html>
通过this html5 validator来看还有w3c validator用户这样看来,上面是有效的HTML5。我正在考虑使用这种技术来管理没有启用JavaScript的用户,从而无法使用我正在计划的单页应用程序,但我之前没有看到它,并且想知道是否
(a)有任何人(b)任何人都可以提出任何有价值的批评,因为我为什么不考虑使用这种技术?
现在它看起来像一个可行的选项给我,但我并不完全相信潜在的副作用(如浏览器不尊重重定向的条件)。
相关问题[