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 8604961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:42:23+00:00 2026-06-12T02:42:23+00:00

I have a systen in place where I have two-layered cache on the website.

  • 0

I have a systen in place where I have two-layered cache on the website. Every request checks for cache on the web server and if it finds the generated page that has been cached, it returns the cache instead of generating it again.

For example:

  1. User A visits website URL http://www.example.com/home/
  2. Server does not find cache
  3. Server generates the page
  4. Server writes the page to cache
  5. Server returns the generated page to User A
  6. User A is happy

and

  1. User B visits website URL http://www.example.com/home/
  2. Server finds cache
  3. Server returns the cache instead of generating the page again
  4. User B is happy

All that works without problems. But I also want to add an option that browser would not ping the server again (saving servers time of checking if cache exists or not) and use its own cache instead.

  1. User A visits URL http://www.example.com/home/ again
  2. Browser has that page in cache
  3. Browser loads the page for the user from cache

I cannot get the latter working. During original page generation, I am sending to the user with the page the following headers:

header('Cache-Control: public, max-age=10000, must-revalidate');
header('Expires: Fri, 03 Feb 2012 01:59:45 GMT');

But when I check for it with Firebug or Chrome Developer Tools it does not say it is using a cache, instead asking for the data from the server again. I know I must be doing something wrong, since I have the same thing set up for static files like Javascript, and that works.

To test this I didn’t just try reloading the page, I created links on the website and moving between those links it asked for the pages from server each time.

Am I missing something?

EDIT:

Alright, apparently what happened was that server sent “Pragma: no-cache” automatically every time. Does anyone know why server would do that? This kept the browser from using cache.

  • 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-12T02:42:24+00:00Added an answer on June 12, 2026 at 2:42 am

    If session is enabled for that page/url, the Pragma: no-cache-header will be added to the http header which prevents the browser from using the cache.

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

Sidebar

Related Questions

I have a doubt in my web application can i place two nework tags
I have a page which takes in request params for place, then generate information,
Acttualy this is my assignment.I have three-four file,related by student record.Every file have two-three
I have an order receipt page auto generated by our system. I need to
I have a form where two fields on the first page of the form
I know normally I have two choices of places: Temporary folder or Cache folder.
Right now I have a base class for my pages which inherits System.Web.UI.Page and
I have a 1 TB Mac server with two partitions: 100 GB for the
At my place of work we have a legacy document management system that for
We have a plugin system on a WCF service that checks libraries placed in

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.