Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Unclear caching behaviour |
|
Author |
|
TK481
Joined: 23 Aug 2011 Posts: 1 Location: Germany
|
Posted: Tue 23 Aug '11 10:33 Post subject: Unclear caching behaviour |
|
|
Hello everyone,
I have a webapp setup and using Apache 2.2.17 on a Linux machine. I observed a strange caching behaviour and maybe someone has an idea about it. Basically I'm requesting a page from two client machines several times and check the Apache log afterwards.
Client 1:
request page -> all resources http get 200
request page again -> all resources http get 304 (only exception is php-index which is set to no-store, no-cache, must-revalidate)
Client 2:
request page -> all resources http get 200
request page again -> php-index http get 200, no further log entries
after that I enabled the apache directive ExpiresByType on one resource. Result:
Client 1: no change
Client 2 on second request -> php-index http get 200, expired resource http get 304
Both clients are using Mozilla Firefox 3.6.19 as user agent and using the same network connection (no proxy involved).
I fail to understand the different behaviour of the two clients. The server sets the default expiration date depending on mime type to something like 1 day to 2 weeks. Therefore I would conclude that the behaviour of client 2 is correct since it only requests a resource again if the expiration date is due. However both clients should be identical which leads me to believe that there might be a problem on the server side/configuration.
Any ideas on this topic?
Thanks in advance
TK |
|
Back to top |
|
Kanashii
Joined: 17 Jul 2006 Posts: 155 Location: Porando
|
Posted: Tue 23 Aug '11 20:51 Post subject: |
|
|
[PHP]
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Expires: Tue, 14 Sep 1999 01:01:01 GMT
[static]
Cache-Control: max-age=2592000, public
Expires: future eq one month date
Age: 23390 |
|
Back to top |
|
dvdoug
Joined: 20 Aug 2011 Posts: 11
|
|
Back to top |
|
|
|
|
|
|