YoutubeSlanger
Junior Member
- Nov 9, 2011
- 184
- 22
okay I need to make a page refresh only once after a set time. I cant find a script for this just scripts that refresh every x amount of time.
Couldn't you just use a simple JS/meta refresh?
Code:<script> ESPN_refresh=window.setTimeout(function(){window.location.href=window.location.href},900000); </script> <noscript> <meta http-equiv="refresh" content="900" /> </noscript>
if($_GET['REFRESHVAR']<>1)
{
header( 'Location: http://www.yoursite.com/new_page.php?REFRESHVAR=1' ) ;}
he wants the to be refreshed only once after it's loaded for the first time.There is also a nice Mozilla addon, which refreshes the page every x seconds.
$('#something').click(function() {
if ($.cookie("RELOADED") == null){
$.cookie("RELOADED",1);
alert("I'm refreshing!");
location.reload();
}else{
alert("Don't refresh!");
}
});