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

  • Home
  • SEARCH
  • 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 3789960
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:14:23+00:00 2026-05-19T12:14:23+00:00

I’m new to HTTP caching and really need some help… I saw many people

  • 0

I’m new to HTTP caching and really need some help…

  1. I saw many people set the "Cache-Control" header when sending XHR to server.
    What is the purpose of doing that? Does request header needs caching too?

  2. I’ve set this header for a XHR:
    Cache-Control max-age=30, must-revalidate, but Firefox 3.6.13 seems do not re-validate the file when I refresh(even force refresh) after 30 seconds. No access-log in server either. Is this because I haven’t set expire header to the file in Apache?

    From Firebug log:

    Response Headers
    Date Sat, 22 Jan 2011 09:59:21 GMT
    Last-Modified Thu, 20 Jan 2011 09:05:11 GMT
    Etag “3e000000023ca7-20d-49a436e5b3413”

    Request Headers
    Keep-Alive 115
    Connection keep-alive
    Content-Type application/xml
    Cache-Control max-age=30, must-revalidate

    The file have been modified, but Firefox does not even do conditional get. Response Date and Last-Modified not update at all.

  • 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-05-19T12:14:24+00:00Added an answer on May 19, 2026 at 12:14 pm

    the server needs to set the re-validate directive, not the client.

    the source controls if and how the content should be cacehd or not cached, the clients decides whether to honor it or not.

    must-revalidate just means that a head request is sent and if the etag differes, the resources is refreshed. this is a very common an dsenseful practice for big files, because the e-tag generally changes once the content changes.

    for small files however it may be your desire to not have any request at all, but a shorter time out. then must-revalidate is wrong.
    the server load and the time it consumes of a head request to a 7kb image is not much less than serving the complete image.

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

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.