0

I need to expire previous page so that my users cannot go back to the previous and change the data inside it.Can anyone give me some idea or example on doing this?

5
Contributors
6
Replies
7
Views
12 Years
Discussion Span
Last Post by sudheer06mca
0

no..i don't use any authentication.Must I use authentication or expire the cookies?

0

No you dont actually need Authentication to clear the cache.If you use authentication you can have better control on your application.

For your application ,
Just add this code to the page load.

Response.Buffer = True
        Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0))
        Response.Expires = 0
        Response.CacheControl = "no-cache"

What happens is It prevents the page from being cached.so that the page will be loaded as a new page rather than taking values from the cache.

0

Response.Expires = -1
Response.Cache.SetNoServerCaching()
Response.Cache.SetAllowResponseInBrowserHistory(False)
Response.CacheControl ="no-cache"
Response.Cache.SetNoStore()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.