How to clear browser history oan clear cache?
<p>I have a login page and a home page. User can log in from the login page to the home page using a username and password. What i want to achieve is :</p>

<p>1) When user log out from home page he/she should not be able to come again to the home page by clicking the back or forward button in the browser.</p>

<p>2) It is sure that the browser will store a history of the home page. But when the user click on the history link of the home page available in the browser it should be redirected to the login page instead of the home page.</p>

<p>i have tried clearing the cache by using the following code like this in the home page page_load event</p>

<pre><code>        HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
          Response.Cache.SetNoStore();
         Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
</code></pre>

<p>But it is not working.Any kind of help is highly appreciated.</p>

<p>With regards</p>

<p>Rain</p>
