is there way to reload a web-page, when javascript is disabled in the brwoser?
I mean, if the u开发者_运维百科ser visits the page first time, and has no javascript enabled, the page reloads with a get parameter like page.php?js=false.
Maybe, thanks for hints.
The only way you could force a page reload, without javascript, is by use of a meta refresh tag. However, this is the wrong way to go: better display that page for the javascript-deprived, and redirect those who DO have javascript to a more appropriate page instead.
<noscript>
<meta http-equiv="refresh" content="2;url=page.php?js=false" />
</noscript>
You can use <noscript>
tag with refresh
<meta>
tag.
Adding to Sarfraz's post, you could do this, to match your request:
<noscript>
<meta http-equiv="refresh" content="2;url=page.php?js=false">
</noscript>
You can do it the other way around:
Assume javascript is not available, and
redirect using javascript to page.php?js=true
.
精彩评论