Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I expire url ?
so if some one clicks on www.mywebsite.com/page.aspx in will exprire in 1 hour?

UPDATE from OP:
Clarification:
if I redirect to: www.mywebsite.com/page.aspx?mydata=params I can use it ones.
In case user didn't close the browser that pages can't be used again
Posted
Updated 25-May-11 5:42am
v2
Comments
R. Giskard Reventlov 25-May-11 11:03am    
Not clear: Do you want the url to expire or the page?

1 solution

As far as I understand your question the solution to your problem will be "Outputcache duration"
For this check this(Output Cache)[^] page.

If thats not the case some alternative options:

How to:Set Expiration Values for ASP.Net Page Caching[^]

ASP>net page expiration[^]

If you are using forms authentication Sliding Expiration is a good way to do it.
Forms authenticationconfiguration.slidingexpiration Property[^]

Good luck,
Orc
 
Share this answer
 
Comments
byka 25-May-11 14:02pm    
Should I set @ OutputCache where on my second page?
So if I have link on page1.aspx redirect to page2.aspx on my page2.aspx I should add @ OutputCache?
Will it clear all my sessions?
Orcun Iyigun 25-May-11 15:04pm    
use it on the page that you want it to expire. Are you using sessions or querstrings? Seems like on this link that you gave "www.mywebsite.com/page.aspx?mydata=params" you use querystrings. Sessions shouldnt be cleared. But you can use VaryByCustom="browser | customstring" or VaryByParam="parametername" for this. Here is a link that explains how to use OutputCache. http://www.codeproject.com/KB/web-cache/OutputCache.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900