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!

How do you delete the last URL in the browser history?

Status
Not open for further replies.

simplyroberto

Programmer
Apr 15, 2005
5
IT
Does anybody know if there is a way of preventing the browser from adding the current page to its history?
I explain: I have a page that keeps loading itself every time the user make changes to it (like deleting a record displayed on the page). Now the user could potentially make several changes and the same page would be loaded several times. If at this stage the user click the browser back button they would see the same page again and again. Is there a way to stop the browser from saving this page to its history either in PHP or Java?
Many thanks,
Roberto
 
Actually, a redirect should eliminate the page from the browser history, since that page will never be sent to the client computer. Otherwise, Javascript

location.replace('new url');

works from the client-side.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top