[英]How to block developers tools (like Firebug) in a page?
I need to block tools like Firebug and Chrome Developer Tools in a specific page. 我需要在特定页面中阻止Firebug和Chrome开发者工具之类的工具。 How can I do that?
我怎样才能做到这一点?
I found this code and it works for Firebug: 我找到了这段代码,它适用于Firebug:
<script>
if( window.console && window.console.firebug ){
alert("Sorry! This system does not support Firebug.\nClick OK to log out.");
window.location='/login_out';
}
</script>
But not for Chrome Developer Tools and others. 但不适用于Chrome Developer Tools和其他工具。 Does anyone know a way of blocking it to most of developer tools?
有谁知道将其阻止到大多数开发人员工具的方法?
Just FYI, I need this to avoid users to change the html code. 仅供参考,我需要这样做以避免用户更改html代码。 I'm using hidden inputs in a form, and sadly, I really need to do this instead using cURL or something similar.
我正在以某种形式使用隐藏的输入,但不幸的是,我确实需要使用cURL或类似方法来执行此操作。 Sorry if "developer tools" was not clear enough.
很抱歉,如果“开发人员工具”不够清晰。
Don't bother. 不要打扰 You can't disable it, and frankly - there's never a good reason to do it.
您不能禁用它,坦率地说-从来没有充分的理由这么做。 Don't send your users anything you don't want them to see.
不要向用户发送您不希望他们看到的任何内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.