Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-13-2002, 03:49 PM   PM User | #1
kestrel7
New Coder

 
Join Date: Aug 2002
Location: Cape Town, South Africa
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
kestrel7 is an unknown quantity at this point
How to force a page to fetch most recent data?

Is it possible to force a page to fetch the most recent data from MySql rather than relying on a cached copy?

I have a problem that when the user updates the database and then returns to the page which shows the user the information just updated, the page is not reflecting the most recent changes. Only once the page has been refreshed will it show the most recent changes.

Is there anyway to force the page to "refresh itself" everytime it is accessed.

Any help will be greatly appreciated!
kestrel7 is offline   Reply With Quote
Old 11-13-2002, 09:15 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
This has nothing to do with MySQL, since the caching is done by the browser. Usually the user sets how often and when cached pages shall be returned.

You should be able to force the browser to reload the page if you redirect to the URL appended with a random value as a query string (try it with the current timestamp). When comparing yourFile.php?bla=123456789 with yourFile.php the browser sees a difference and tries to load the page anew.

Hope that helps.
mordred is offline   Reply With Quote
Old 11-13-2002, 10:03 PM   PM User | #3
bcarl314
Mega-ultimate member


 
Join Date: Jun 2002
Location: Winona, MN - The land of 10,000 lakes
Posts: 1,855
Thanks: 1
Thanked 45 Times in 42 Posts
bcarl314 will become famous soon enough
You could try adding the following between your <head></head> tags

Code:
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
bcarl314 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:04 PM.


Advertisement
Log in to turn off these ads.