0

I'm trying to clear the cache of my site when a certain button is pressed. I have put the following in an if statement however I keep getting stuck in an infinite loop. Not sure why? Here's what I'm echoing within my if statement:

echo "<meta http-equiv=\"refresh\" content=\"0; mywebsitetest.org/ \" />";
echo "<meta http-equiv=\"pragma\" content=\"no-cache\">";
echo "<script type=" . "text/javascript" . ">";
echo "window.location.replace('mywebsitetest.org') </script>";

Thanks in advance.

4

1 回答 1

3
<meta http-equiv="refresh" content="0; mywebsitetest.org/ " />

refreshes the page in 0 seconds.

window.location.replace('mywebsitetest.org')

also refreshes the page on load.

If your conditions remain true after reloading, you are stuck in an infinite refreshing loop.

于 2013-04-27T19:48:07.330 回答