How to disable meta refresh tag in Google Chrome using Java Script?
I Have tried removing meta refresh tag as shown below,
$('meta[http-equiv=Refresh]').remove()
This works fine in IE & firefox.
How to disable meta refresh tag in Google Chrome using Java Script?
I Have tried removing meta refresh tag as shown below,
$('meta[http-equiv=Refresh]').remove()
This works fine in IE & firefox.
You cannot disable meta refresh by manipulating the DOM. It does not work anymore.
The workaround is to retrieve the original markup, find and replace the meta refresh element, and then write the new document with the replaced markup.
Although I have not tested this technique in Chrome, it works in Opera. Here is my code:
You can call window.stop()
in a load
event handler. At least chrome does not actually start the refresh timer untilm the page has successfully loaded, and calling stop
this way will stop the refresh once the page is considered to be fully loaded.