CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Posts
    6

    Internet explorer and Action cancelled

    Whenever i try to access a site it shows a message
    "Action cancelled". this is happening whenever i click on any of link in the site. I am able to see the page only when i refresh everytime. I have cleared the cache.

    Also when i logout and login as a different user the browser shows the details of the previous user. Please help?

    Regards
    Ashwani

  2. #2
    Join Date
    Aug 2002
    Location
    Reykjavik, Iceland
    Posts
    201
    For the "Action canceled" issue - what happens when you use Netscape 4.x or Netscape 6.x?

    As for the logging out and logging in as a different user, and still seeing the data for the previous user, this is client side caching of the pages. To combat client side caching, append a query string variable with a random number as it's value to the URL. Because the URL to a given page will be unique each time, it can't be cached.

    <script language="JavaScript" type="text/javascript">

    random.m = 714025;
    random.a = 4096;
    random.c = 150889;
    random.seed = (new Date()).getTime() % random.m;

    function random() {
    random.seed = (random.seed * random.a + random.c) % random.m;
    return Math.round((random.seed / random.m) * 1000);
    // This will generate a random integer between 0 and 1000. If you
    // want to increase the range to between 0 and x, replace the
    // "1000" in the above line with "x"
    }

    </script>

    ...

    <body>
    <script language="JavaScript" type="text/javascript">
    nexturl = "/page2.jsp?foo=" + random();
    </script>
    <a href="#" onclick="window.location=nexturl; return false">page 2</a>

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured