简体   繁体   English

如何在页面中阻止开发人员工具(如Firebug)?

[英]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.

相关问题 如何使用不带浏览器和yslow / firebug等工具的javascript和cookie来测量页面速度 - how to measure page speed with javascript and cookies included without browser and tools like yslow/firebug 如何判断页面是否已在Firebug或Chrome Developer工具中重新加载? - How to tell if a page has been reloaded in Firebug or Chrome Developer tools? 有没有办法防止使用类似Firebug的工具编辑页面中的HTML和CSS内容? - Is there a way to prevent the editing of HTML and CSS contents in a page using Firebug-like tools? 有没有办法防止使用类似Firebug的工具编辑页面中的HTML和CSS内容? - Is there a way to prevent the editing of HTML and CSS contents in a page using Firebug-like tools? 如何杀死 Chrome 开发者工具中的警告框? - How to kill alert box in Chrome developers tools? 多页表单提交,如何使用Firebug或html inspect工具避免隐藏字段中的表单数据更改 - Muti-page Form Submission, how to avoid form data changes in hidden fields using firebug or html inspect tools 如何编写firefox扩展,在firebug的页面上下文中运行javascript代码 - How to code firefox extension which run javascript code in the page's context like firebug does 如何使用 Firebug 或类似工具调试 JavaScript / jQuery 事件绑定? - How to debug JavaScript / jQuery event bindings with Firebug or similar tools? Javascript +浏览器-如何检测何时打开开发工具/ firebug? - Javascript + Browser - How to detect when dev tools / firebug is open? 如何使用Google Developers / Firebug记录所有dom子树修改 - how to log all dom subtree modifications with google developer tools/firebug
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM