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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:42:15+00:00 2026-05-16T03:42:15+00:00

I’m really confused by all that caching stuff. I’m trying to setup mod_expires to

  • 0

I’m really confused by all that caching stuff. I’m trying to setup mod_expires to reduce the number of HTTP Requests from my website to the server.

I did well so far, I installed mod_expires and wrote a little .conf file from the instructions on http://httpd.apache.org/docs/2.0/mod/mod_expires.html.

Now, for instance, all my .png, .gif, .jpeg files have a Cache-Control header. My expected result was, that the browser won’t do any GET Request within the time period (given from the Cache-Control value). But it does, every single file fires a request and receives HTTP 304 not Modified.

That is the wrong behavior isn’t it ? It should load that files from the internal cache.
One thing I don’t understand is, that the browser sends a Response header: Cache-Control: max-age=0. Should it be like that?

Here is an complete example Request + Response headers for a single .png file:

Request

Host             dev-mgg.localdomain
User-Agent     Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722     Firefox/3.6.8
Accept         image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language  de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding  gzip,deflate
Accept-Charset   ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive     115
Connection     keep-alive
Referer       http://dev-mgg.localdomain/css/global/icons.css?18224
Cookie         IR_SQLPwdStore=; IR_SQLUser=sysadm
If-Modified-Since   Thu, 24 Jul 2008 06:24:11 GMT
If-None-Match   "4010127-3c4-452bf1aefd8c0"
Cache-Control   max-age=0

Response

Date         Mon, 02 Aug 2010 14:00:28 GMT
Server     Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch mod_perl/2.0.4     Perl/v5.10.0
Connection   Keep-Alive
Keep-Alive   timeout=15, max=59
Etag         "4010127-3c4-452bf1aefd8c0"
Expires   Mon, 02 Aug 2010 14:04:28 GMT
Cache-Control   max-age=240
  • 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-16T03:42:16+00:00Added an answer on May 16, 2026 at 3:42 am

    It looks like the Expires header being sent back by the server is only 4 minutes in the future. The algorithm by which web browsers decide whether or not to actually make a request (based on Expires values) uses the “closeness” of the current time to the expiration date – so unless the expiration date is still a long time away (weeks, months, years), you can be pretty sure that the browser will make a request for the file.

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am trying to loop through a bunch of documents I have to put
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,

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.