Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default IE Page caching

    I am using forms authentication and session variables
    to control access and disallow "data stripping".
    Some query strings are used, but the Users access is
    verified before allowing access.
    Illegal access is diagnosed, the user is logged off,
    session vars are cleared and he is redirected to a
    login page with a warning for the security violation.
    All works fine, but if he hits the back key in the browser,
    he returns to his previous page, no page_load events
    are notified.
    At first I thought this was a problem with sessions
    and the forms security, but realized this is simply IE
    caching at work, hence no events.
    Is there a way clear out the IE cache upon such a
    violation, i.e., clear the cache when I want to ?
    Thanks for reading this,
    Sink
    Sink Guest

  2. Similar Questions and Discussions

    1. Force page to refresh/prevent caching
      Greetings JGLADNICK. This is referring to your post on CFusion/WebForums of one year ado regarding "Prevent Caching". Have you ever been able to...
    2. Page and Data Caching in .Net
      I found some good information On Page and Data Caching in .Netat this site http://www.dedicatedsolutions.co.uk/DesktopDefault.aspx?tabid=62 It is...
    3. to prevent client side web page caching
      Hi, I wish to avoid caching asp pages at the user end . Currently I have declared Response.Expires=0 at the top of my asp page. I have also used...
    4. PHP page caching issue
      Hi folks. I have an interesting problem with regards to some PHP pages of mine. Basically, I have a form page where the user is able to use list...
    5. Page Caching Problem
      I am having a problem with web forms I have uploaded to my hosting site not running the most recent version. The .aspx file I have FTPed to my...
  3. #2

    Default IE Page caching

    You might try expiring the content immediately to prevent
    IE from caching it.
    Response.Expires = -1;

    Joe
    >-----Original Message-----
    >I am using forms authentication and session variables
    >to control access and disallow "data stripping".
    >Some query strings are used, but the Users access is
    >verified before allowing access.
    >Illegal access is diagnosed, the user is logged off,
    >session vars are cleared and he is redirected to a
    >login page with a warning for the security violation.
    >All works fine, but if he hits the back key in the
    browser,
    >he returns to his previous page, no page_load events
    >are notified.
    >At first I thought this was a problem with sessions
    >and the forms security, but realized this is simply IE
    >caching at work, hence no events.
    >Is there a way clear out the IE cache upon such a
    >violation, i.e., clear the cache when I want to ?
    >Thanks for reading this,
    >Sink
    >.
    >
    Joe Audette Guest

  4. #3

    Default IE Page caching

    Hi Joe,
    Thanks for the response. The only problem I would
    have with having all responses expire immediately is
    that then the back button would never work and
    the expired message is really annoying.
    Is there another way?
    Sink
    >-----Original Message-----
    >You might try expiring the content immediately to prevent
    >IE from caching it.
    >Response.Expires = -1;
    >
    >Joe
    >
    >>-----Original Message-----
    >>I am using forms authentication and session variables
    >>to control access and disallow "data stripping".
    >>Some query strings are used, but the Users access is
    >>verified before allowing access.
    >>Illegal access is diagnosed, the user is logged off,
    >>session vars are cleared and he is redirected to a
    >>login page with a warning for the security violation.
    >>All works fine, but if he hits the back key in the
    >browser,
    >>he returns to his previous page, no page_load events
    >>are notified.
    >>At first I thought this was a problem with sessions
    >>and the forms security, but realized this is simply IE
    >>caching at work, hence no events.
    >>Is there a way clear out the IE cache upon such a
    >>violation, i.e., clear the cache when I want to ?
    >>Thanks for reading this,
    >>Sink
    >>.
    >>
    >.
    >
    Sink Guest

  5. #4

    Default RE: IE Page caching

    Hi Sink,

    you can't actually disable back button but you can prevent it going back,
    by using javascripts history.forward function. When you logged off from
    page A and wants to goto page C, take page B as middle page ...instead of
    going to page C directly ..go via page B:

    your page B will redirect to page C and will be having javascript
    history.forward function.

    here is the code

    you need to put in pageB

    <script language="javascript">
    window.location="pageC.html"
    window.history.forward(2);
    </script>

    Hope this help,

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)




    MSFT Guest

  6. #5

    Default RE: IE Page caching

    And here is a tested solution for ASPX:

    Webform1:

    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
    AutoEventWireup="false" Inherits="WebApplication8.WebForm1" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>WebForm2</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema"
    content="http://schemas.microsoft.com/intellisense/ie5">
    <script language="javascript">

    function b() {
    window.open("webform2.aspx","_self",null,true);
    }
    </script>
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <INPUT id="button2" onclick="b();" type="button" value="Button">
    </form>
    </body>
    </HTML>


    In webform2:

    private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Redirect ("WebForm3.aspx");
    }


    After you click the button on Webform1, the browser will open webform3 and
    the Back button is disabled.

    Hope this help,

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    MSFT Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139