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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:30:44+00:00 2026-06-16T15:30:44+00:00

I’ve been reading a lot about this , but still there are few misunderstandings.

  • 0

I’ve been reading a lot about this , but still there are few misunderstandings.

I read that the max-age should be set only to static data.

I used fiddler composer to make this request

User-Agent: Fiddler
Host: www.example.com

the response is :

HTTP/1.1 200 OK
Date: Tue, 01 Jan 2013 20:37:31 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Thu, 06 Dec 2012 19:40:14 GMT <======
...

Q#1

If the server sends the last-modified header , is it becuase that the page is a static one ? ( someone has set max-age) at the server side ?

Q#2

After a client got this first response , the next time it will ask it is with If-Modified-Since header and the server might return 200 or 304 (not Modified).
But why the server in his first response didn’t already mention the max-age ? it could save the client from sending the second request !

Q#3

Alghough this conditional get suppose to save me from downloading the whole page , is is still discourage , so what other option do I have ? ( for static data)

Q#4

How does the iis knows if it was modified or not ? by looking at the file date modified ? are you going to tell me that for every date check it is doing IO access ? if not , where does it saves that info ?

Q#5

After the client got the first response it needs the page one more time. does it sending again a request with If-Modified-Since ? if no , what if the page did changed while this intreval ? and if yes – why did the server responded with max-age header ? I have nothing to do with it.

  • 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-16T15:30:45+00:00Added an answer on June 16, 2026 at 3:30 pm

    The max-age clause of the Cache-Control header has to be enabled explicitly. The exact manner of doing so, obviously, depends on the server software.

    The Last-Modified: and If-Modified-Since: interaction is independent of this, because that mechanism was invented long before max-age.

    You will always get a Last-Modified: for any server side resource that the server does not know (again, by server-specific means) to be dynamically generated. Cache-Control: max-age=whatever, if also present, allows the client or cache to save on update requests (using If-Modified-Since).

    But this extra header requires a server setting. It does not happen automatically for “static data”. Nor does a Last-Modified: indicate “static data”. (It is possible for a server side handler process to generate a Last-Modified header to be relayed to the client.)

    Q1: No. The server was not configured to recognize the data as dynamic. max-age has nothing to do with it.

    Q2: Because max-age was not enabled. It does not happen automatically.

    Q3: No other option. If-Modified-Since was designed to save on bandwidth.

    Q4: IIS, like all other servers, has to be configured to enable max-age. No guesswork involved. As for determining whether something has changed, this does involve a comparison of the date sent by the client in the If-Modified-Since header with date information stored on the server. For static data in a file this would typically involve a system call such as GetFileAttributesEx() on Windows, or fstat() on other platforms.

    Q5: If a client issues an update request (with If-Modified-Since:) before a Cache-Control: max-age previously received from the server has expired, then either the client is broken, or it is executing an externally triggered “force update/refresh” option. (Note that an If-Modified-Since request pressupposes that the client still has the previous version, in some cache. If it doesn’t, then it will not send this header, simply because it doesn’t have the date!)

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

Sidebar

Related Questions

I know there's a lot of other questions out there that deal with this
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

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.