4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by employwise
0

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
add this to your aspx page or
in code behind add this one

response.expires = 0
response.cache.setnostore()
response.appendheader("Pragma", "no-cache")

hope that helps

0

you can also do with C# code for clearing cache.

string cacheKey;
IDictionaryEnumerator CacheEnum = HttpContext.Current.Cache.GetEnumerator();
 while (CacheEnum.MoveNext())
                {
                    cacheKey = CacheEnum.Key.ToString();
                    HttpContext.Current.Cache.Remove(cacheKey );
                }
0

To clear history using java script code just try following code.
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"

If Len(Session("FirstTimeToPage")) > 0 then

Session("FirstTimeToPage") = ""
Response.Redirect "home.aspx"'home page
Response.End
End If


%>

Edited by employwise: n/a

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.