是否可以在Google Chrome中停用元刷新? [英] Is it possible to disable meta refresh in Google Chrome?
问题描述
在使用元刷新的网页上,是否有任何方法可以在Chrome浏览器扩展程序中禁用元刷新?
我正在寻找相同类型的扩展(西班牙在线报纸滥用元/刷新标签),我没有发现,并且在其他网站中,我登陆这个问题。
所以我开始分析如何做到这一点。这不是简单的,需要一些技巧,但我已经做到了。
此扩展程序已在Chrome网上应用店中停止自动刷新: https://chrome.google.com/webstore/detail/lcldcllmbokpbniijpnkpgoboadbfphb
更多信息,大部分是西班牙文版, http://gallir.wordpress.com/2012/07/12/stop-autorefresh-evitar-la-recarga-automatica-tipica-de -los-periodicos-digitales-en-chromechromium /
从扩展名描述中可以看出:
实现注意事项:Chrome和Chromium不允许禁用刷新元标记,也不能提供取消它的简单方法。该扩展使用http技巧。当[不可避免的]刷新被触发时,它会拦截它,检查它是否是刷新事件,如果是,它会将连接重定向到一个小脚本(当前为App Engine)。该脚本仅返回204状态码,因此浏览器不会修改页面内容,也不会尝试再次刷新它。
On pages with meta refresh, is there any way to disable meta refresh, within a Google Chrome extension?
I was looking for the same kind of extension (Spanish online newspapers abuse of the meta/refresh tag), I found none, and, among other sites, I landed in this question.
So I started to analyze how this could be done. It was not simple, and needed some tricks, but I've done it.
The extension is already in Chrome Web Store, "Stop Autorefresh": https://chrome.google.com/webstore/detail/lcldcllmbokpbniijpnkpgoboadbfphb
More info, mostly in Spanish, in http://gallir.wordpress.com/2012/07/12/stop-autorefresh-evitar-la-recarga-automatica-tipica-de-los-periodicos-digitales-en-chromechromium/
From the extension description:
Implementation notes: Chrome and Chromium don't allow to disable the refresh meta tag, nor they provide an easy method for cancelling it. The extension uses a http trick. When the [unavoidable] refresh is fired, it intercepts it, checks if it's the refresh event, if so, it redirects the connection to a small script (currently en App Engine). This script just returns a 204 http status code, so the browser does not modify the content of the page, and doesn't try to refresh it again.
这篇关于是否可以在Google Chrome中停用元刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!