用户可以在客户端禁用javascript吗?可能吗? [英] Can User disable javascript at client side ? is it possible?

查看:98
本文介绍了用户可以在客户端禁用javascript吗?可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以从浏览器禁用javascript吗?

it is possible to disable javascript from browser ?

推荐答案

我用过的所有支持Javascript的浏览器都能够相当容易地禁用Javascript。有一个名为NoScript的Firefox附加组件,可以在逐个源的基础上轻松禁用Javascript。 Javascript是一种通用的编程语言,假设你可以在其他人的系统上运行任意程序是一个坏主意。

All browsers I've ever used that support Javascript in the first place have had the ability to disable it fairly easily. There's an add-on for Firefox called NoScript that makes it easy to disable Javascript on a source-by-source basis. Javascript is a general-purpose programming language, and it's a bad idea to ever assume you get to run arbitrary programs on somebody else's system.

此外,你不能依赖在Javascript上的安全性。它以源代码形式发送到浏览器,可以在浏览器上更改,没有太大困难。 Javascript与安全性完全无关。

Moreover, you can't rely on Javascript for security. It's sent to the browser in source form, and can be altered on the browser without much difficulty. Javascript is entirely irrelevant to security.

有两种方法可以考虑保护客户端站点。一个是保护与SSL的连接,这与Javascript无关。它需要获得证书(通常,使用现代浏览器,从您接受的证书颁发机构支付的证书)并进行设置。

There's two ways you could be thinking of securing a client site. One is securing the connection with SSL, and that has nothing to do with Javascript. It requires obtaining a certificate (usually, with modern browsers, one you pay for from an accepted certificate authority) and setting it up.

第二个是验证信息浏览器发送。使用Javascript执行此操作没有任何害处,因为您的网页可以以这种方式响应更快,但如果有任何安全原因来验证输入,则必须在服务器上完成。您发送的任何Javascript都可以由使用浏览器的人检查和更改,并且可以修改任何可以通过HTTP发送的内容。

The second is to validate the information the browser sends. There's no harm in doing this with Javascript, since your web page can be more responsive that way, but if there is any security reason to validate input, it absolutely has to be done on the server. Any Javascript you send can be examined and changed by the person using the browser, and anything that can be sent by HTTP can be modified.

这篇关于用户可以在客户端禁用javascript吗?可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆