Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
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 6:47am
Edited 15-Nov-12 7: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
0 Dnyaneshwar@Pune 719
1 Sergey Alexandrovich Kryukov 325
2 Peter Leow 280
3 CPallini 245
4 TheRealSteveJudge 208
0 Sergey Alexandrovich Kryukov 8,963
1 OriginalGriff 6,766
2 Peter Leow 4,262
3 Zoltán Zörgő 3,769
4 Richard MacCutchan 2,588

Advertise | Privacy | Mobile
Web03 | 2.8.150128.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2015
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