是否有可能禁用AJAX无完全禁用JavaScript的? [英] Is it possible to disable AJAX without disabling JavaScript completely?

查看:106
本文介绍了是否有可能禁用AJAX无完全禁用JavaScript的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时可以禁用AJAX无完全禁用JavaScript的?

Is it possible to disable AJAX without disabling JavaScript completely?

推荐答案

如果您使用的是Firefox,你可以用的GreaseMonkey做到这一点。 (https://addons.mozilla.org/en-US/firefox/addon/748)

If you are using Firefox, you could accomplish this with GreaseMonkey. (https://addons.mozilla.org/en-US/firefox/addon/748)

通用汽车申请脚本一些您所访问的网页的部分或全部的框架。我有禁用谷歌-分析下载(因为他们慢下来)通用脚本,并禁用谷歌点击跟踪在谷歌结果页(因为它困扰着我,他们正在这样做)。

GM is a framework for applying scripts to some or all of the pages you visit. I have GM scripts that disable google-analytics downloads (because they slow things down), and which disable google-click-tracking on google result pages (because it bothers me that they are doing that).

下面是我的谷歌单击禁用脚本:

Here is my google-click disable script:

// ==UserScript==
// @name           Google Clk
// @namespace      googleclk
// @description    Disable Google click tracking
// @include        http://*google.com/*
// ==/UserScript==
// Override google's clk() function, which reports all clicks back to google
unsafeWindow.clk = function(url) {} // { alert(url); } // I use this to test.

这样做有XMLHtt prequest(和其他功能)类似的东西,你可以有效地将其禁用。当然,你可以完全这样做打破了网页,但你已经知道了。

By doing something similar with XMLHttpRequest (and other functions) you can effectively disable them. Of course, you may completely break the page by doing this, but you already knew that.

这篇关于是否有可能禁用AJAX无完全禁用JavaScript的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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