Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reloading,refreshing the page when users click the back button

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
Hi all!

When users clicks the back button,Is there any way we can may the page to reload it again ,That is distroying the cache.and requesting a new page to the server.

I have added the following meta tags in the page but still its not working

<META http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;>
<META HTTP-EQUIV=&quot;Cache-Control&quot; content=&quot;no-cache&quot;>
<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;-1&quot;>


and also how to implement page reload()
when users cliks the back button in the browser.

Thanx
:)
 
i'm not sure i understand what you mean ... if it is : how to reload the page when the user hits the back button, then on the PREVIOUS page, don't use a link (such as <a href=...> or this.location=...) but a history.replace(...)
this will &quot;destroy&quot; the entry in the cache for the previous page (actually it replaces this entry with the provided page)
 
What about the back button on the toolbar? - What about:

document.history.length = 0;

I doubt it will work - but it's something like this you need to try? Or try to set the referrer? Id oubt that too - maybe it's impossible to change the history?
b2 - benbiddington@surf4nix.com
 
something like this in all your links would kill the history as far as your site goes, but not for other sites (this portion is completely read-only, and only by other native functions):

<a href=&quot;window.location.replace('newpage.htm')&quot;>Go</a>

the replace function replaces the current item in history with a new one.

jared@aauser.com -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top