RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 5879 | Replies: 6
Reply
Join Date: Apr 2006
Posts: 3
Reputation: f3dor4core is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
f3dor4core f3dor4core is offline Offline
Newbie Poster

Question refresh page one time only..

  #1  
Apr 17th, 2006
how to refresh page one time only?
if i using <meta http-equiv=refresh content=\"0;URL=\".... it keep on refresh every according as what in the content was set.

wat i want is.. it only refresh one time only before the page was loaded.
can anybody help me? thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Location: Florence Ky
Posts: 31
Reputation: DGStudios is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 3
DGStudios DGStudios is offline Offline
Light Poster

Re: refresh page one time only..

  #2  
Apr 17th, 2006
Use an if statement that wont succeed after the reload. Alot of my code uses redirects with that but they all go to the same page. I just use a variable set that helps stop it from getting to the redirect the second time. But it's all up to how you want to do it.

also consider why is it doing the refresh. Is there another way other than the meta tag get it to go. When is it refreshing and why.
http://img.photobucket.com/albums/v6.../dgstudios.jpg
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
Reply With Quote  
Join Date: Apr 2006
Posts: 3
Reputation: f3dor4core is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
f3dor4core f3dor4core is offline Offline
Newbie Poster

Re: refresh page one time only..

  #3  
Apr 17th, 2006
Thanks. i'll try first.
Reply With Quote  
Join Date: Oct 2004
Location: San Francisco, CA
Posts: 338
Reputation: paradox814 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: refresh page one time only..

  #4  
Apr 18th, 2006
if you just want to make sure it automatically loads the newest copy of the page, eg do a auto-refresh you don't need to use a meta tag, try using a header function instead...

[php]header('Cache-Control: no-store, no-cache, must-revalidate');[/php]
Reply With Quote  
Join Date: Oct 2004
Location: San Francisco, CA
Posts: 338
Reputation: paradox814 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: refresh page one time only..

  #5  
Apr 18th, 2006
another option, using the meta tag:
replace
<meta http-equiv=refresh content=\"0;URL=\"....

with (assuming the page you want to reload is index.php)

[php]if (!isset($_GET['reload'])) {
echo '<meta http-equiv=Refresh content="0;url=index.php?reload=1">';
}[/php]
Reply With Quote  
Join Date: Apr 2006
Posts: 3
Reputation: f3dor4core is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
f3dor4core f3dor4core is offline Offline
Newbie Poster

Re: refresh page one time only..

  #6  
Apr 19th, 2006
thanks paradox... busy with other works last few days... now back to my php. hm.. i've tried to code... but its displaying error 404 each time the refresh taken.
Anyway... thanks paradox.
Reply With Quote  
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: refresh page one time only..

  #7  
Apr 20th, 2006
Make sure you change the url (of code provided by paradox) to the page you are working on. I used the similar method on my site for two years now and no single problem found.
Ecommerce-Web-Store.com Building Your e-Business.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:57 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC