我有一行代码,如果用户阻止 Javascript,则将用户从 index.php
重定向到 enable-js.php
:
<noscript><meta http-equiv="refresh" content="0;url=enable-js.php"></noscript>
由于这是客户端重定向,因此用户在禁用 JavaScript 的情况下是否仍然可以访问 index.php
来执行诸如填写表单之类的操作,或者我应该找到一个替代实现 PHP headers
的方法?
最佳答案
Since this is a client side redirect, is it still possible for a user to still access index.php to do something like fill out a form, or should I find a way to implement PHP headers instead?
是的。他们可以通过 cURL 编写脚本(根本不会处理元刷新)、取消导航(例如,通过快速按转义键)或 disable meta refresh in the browser entirely .
关于javascript - 是否元刷新重定向 "Secure",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49037157/