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!

Cache prob

Status
Not open for further replies.

gust1480

Programmer
Mar 19, 2002
148
PH
Trying to prevent user from going back to the previous page but still to no success..it still goes to the previous page..
already inserted this code..
response.expires = -1
response.addheader "pragma", "no-cache"
response.addheader "cache-control","no-stor"

what am i doing wrong?
 
is it a typo :

response.addheader "cache-control","no-stor[red]e[/red]"

-DNG
 
also this small trick using Javascript also does what you want..

<script>
history.forward()
</script>

put in the page from where you dont want to go back/previous page...

-DNG
 
Thanks DNG! have tried it and it worked! But stil have the same problem. Am preventing user from going back/forward to some pages because there are pages that writes info on the db and I don't want it to write the same info on the db unless it is a fresh transaction and not because the forward/back button is pressed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top