Click here to Skip to main content
12,887,576 members (28,629 online)
Rate this:
Please Sign up or sign in to vote.
See more: SQL-server-2005 VB ASP.NET , +
after entering user name and password it lead me to main page. but i want If I enter back arrow it don't allow me to go forward without entering password. so how can i do this.?
Posted 15-Nov-12 5:47am
Updated 15-Nov-12 6:56am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Turn off caching in your pages, so the browser does not show a cached version.


<%@ OutputCache Duration="0" VaryByParam="None"%>

should do it.

This[^] is also useful. In theory, the plain HTML way to do it is:

<meta http-equiv="Pragma" content="no-cache">

although when I googled I found someone who recommended all of this:

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100