Meta Refresh not working in Firefox

2019-06-13 00:48发布

问题:

I'm using meta refresh with <meta HTTP-EQUIV="REFRESH" CONTENT="0; URL=javascript:window.open('home.asp?uuid=123','_top');"> and it works in every other browser except Firefox. Any ideas?

回答1:

In FireFox autorefresh has been disabled by default.

To enable autorefresh in your browser:

  1. type about:config in the location bar of your webbrowser
  2. a message appears: click to accept
  3. search for blockautorefresh
  4. change accessibility.blockautorefresh from false to true

Good luck!



回答2:

accessibility.blockautorefresh TRUE

does not stop HTML or Java based refreshes- It's quite common for webmasters to pimp their page hits by chain refreshing, typically at 1 second intervals- I learned about accessibility.blockautorefresh, celebrated, changed the value and was sorely disappointed that it didn't work for HTML / Java based refreshes. I absolutely despise web developers who use my equipment to falsify page hits for monetized reasons. every other major browser can manage it. I use Firefox specifically because of the level of control it gives and love FF muchly, but am forced to go back to IE until Firefox catches up.



回答3:

Just put (id) that you require within the Action element in form like this: I try in php code..

$q = $_GET['id'];
...
echo"<meta http-equiv='refresh' content='0;URL=home.php?q=".$q."' />";

<form role="form" action="home.php?q=<?php echo $q; ?>" method="POST">