Is it possible to disable meta refresh in Google Chrome?

后端 未结 4 1690
走了就别回头了
走了就别回头了 2020-12-28 15:21

On pages with meta refresh, is there any way to disable meta refresh, within a Google Chrome extension?

4条回答
  •  没有蜡笔的小新
    2020-12-28 16:13

    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.

提交回复
热议问题