BreakBreak Posted October 19, 2006 Share Posted October 19, 2006 Is it possible to make a page refresh as soon as it's loaded (i.e green bar at bottom right stops loading)This would help a lot with my loops that i don't want to end, thanks. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 19, 2006 Share Posted October 19, 2006 infinite loop.Or if you want a permanent refresh(totally pointless)<?phpheader('Location: page.php');?>it will redirect over to the same page over and over and over again, but there is absolutely no point, unless you wnat to piss people off. Quote Link to comment Share on other sites More sharing options...
obsidian Posted October 20, 2006 Share Posted October 20, 2006 [quote author=businessman332211 link=topic=112064.msg454667#msg454667 date=1161293546]infinite loop.Or if you want a permanent refresh(totally pointless)<?phpheader('Location: page.php');?>it will redirect over to the same page over and over and over again, but there is absolutely no point, unless you wnat to piss people off.[/quote]that won't ever fully load, however. what he's asking for is to refresh the page [b]after[/b] a full page load. to do this, you'd want to use a javascript refresh. something like this should do the trick:[code]window.onload = function() { window.location.reload(true);}[/code]remember that with the reload() function, the boolean value passed to it forces it to reload from the server (if it's false, it allows it to reload from cache). Quote Link to comment Share on other sites More sharing options...
BreakBreak Posted October 20, 2006 Author Share Posted October 20, 2006 Does the on.load function work if the php terminates the page as it's been running too long?Where would i put that function above? Quote Link to comment Share on other sites More sharing options...
obsidian Posted October 20, 2006 Share Posted October 20, 2006 the function i showed above is a javascript function, so it's a client refresh. if your server times out because your script was running too long, it will simply die as with any other PHP error. as you asked in your initial post, this doesn't actually force the refresh until the page has [b]completed loading[/b], so while the script is running on the server, it will not refresh.with that said, you'd simply place that code above within script tags in the head of your page like you would with any other javascript function.good luck! Quote Link to comment Share on other sites More sharing options...
BreakBreak Posted October 20, 2006 Author Share Posted October 20, 2006 Damn, i need it to refresh if the php times out.What confuses me IMENSELY is that it SOMETIMES times out and other times is completley fine :! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.