Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8191283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:53:04+00:00 2026-06-07T03:53:04+00:00

I created a simple ASP.NET 3.5 Web app with two pages. Each page has

  • 0

I created a simple ASP.NET 3.5 Web app with two pages. Each page has a label that displays the time and a Button to postback. In the Page_Load for each page I have the following:

        Response.ClearHeaders();
        Response.AppendHeader("Cache-Control", "no-cache"); //HTTP 1.1 
        Response.AppendHeader("Cache-Control", "private"); // HTTP 1.1 
        Response.AppendHeader("Cache-Control", "no-store"); // HTTP 1.1 
        Response.AppendHeader("Cache-Control", "must-revalidate"); // HTTP 1.1 
        Response.AppendHeader("Cache-Control", "max-stale=0"); // HTTP 1.1  
        Response.AppendHeader("Cache-Control", "post-check=0"); // HTTP 1.1  
        Response.AppendHeader("Cache-Control", "pre-check=0"); // HTTP 1.1  
        Response.AppendHeader("Pragma", "no-cache"); // HTTP 1.1  
        Response.AppendHeader("Keep-Alive", "timeout=3, max=993"); // HTTP 1.1  
        Response.AppendHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // HTTP 1.1 

I want to force the “page is expired” message if the user clicks on the Back button. However, what is happening is the Back button is showing the previous page, not pulling from cache but refreshing the page. The label is updated with the current time. I don’t want the page to refresh but instead show the “page is expired” message. How can I force that? I have tested this using IE9 but I need the behavior the same for all browsers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:53:05+00:00Added an answer on June 7, 2026 at 3:53 am

    The “page is expired” message is usually given when a browser sends a POST request to a page, and the user wishes to refresh or go back to it. To force it, you’ll have to make every page a POST request. This thread might be able to provide you with the JavaScript code to convert all links (which are GET requests) to POST requests.

    Alternatively, you can use JavaScript or cookies to keep a history of the pages visited, and if the user attempts to return to a page, you can use it to redirect them or give them a message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a very simple asp.net web page for generating some HTML. The idea
I'm building a simple game in an ASP.NET/VB.NET web app. The game has a
I have put together a simple ASP.NET MVC 3 test web app that uses
I have a very simple asp.net mvc web app which uses castle active record,
I have a very simple app on my local machine that uses the ASP.NET
I'm working on an ASP.NET webforms app that will serve as a simple intake
I've created a simple C# asp.net web service function which returns a string message
I started porting a simple ASP.NET MVC web app from SQL to RavenDB. I
I have created a very simple ASP.NET application with a web.config file, which contains
I created a simple ASP.NET MVC version 1.0 application. I have a ProductController which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.