Jump to content

Recommended Posts

Hi,

 

I use this headers for my PHP file:

        header("Last-Modified: " . gmdate("D, d M Y H:i:s",filemtime("../cache/css/".$md5file.".css")) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time()+(2592000)) . " GMT");
header('Cache-Control: public, max-age=2592000');

 

But when i check my website in FireBug, i get 200 OK response but i think this is should response 304 Not modified ...?

 

See this details :

 

[b]Response Header[/b]

Date	Sat, 05 Jun 2010 07:04:53 GMT
Server	Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
X-Powered-By	PHP/5.3.1
Last-Modified	Wed, 28 May 2008 21:02:26 GMT
Expires	Mon, 05 Jul 2010 07:04:53 GMT
Cache-Control	public, max-age=2592000
Content-Encoding	gzip
Vary	Accept-Encoding
Content-Length	408
Keep-Alive	timeout=5, max=99
Connection	Keep-Alive
Content-Type	text/css

[b]Request Headers[/b]

Host	localhost
User-Agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept	text/css,*/*;q=0.1
Accept-Language	en-us,en;q=0.5
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://localhost/cache/test.php
Cookie	PHPSESSID=fnrlds14pqedj0s96mvasfqvo5
If-Modified-Since	Wed, 28 May 2008 21:02:26 GMT
Cache-Control	max-age=0

 

And more about cache:

 

Last Modified	Sat Jun 05 2010 10:34:53 GMT+0330 (Iran Standard Time)
Last Fetched	Sat Jun 05 2010 10:34:53 GMT+0330 (Iran Standard Time)
Expires	Mon Jul 05 2010 10:34:53 GMT+0330 (Iran Standard Time)
Data Size	408
Fetch Count	23
Device	disk

 

Is there any solution?  ::)

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/203939-expire-last-modified-header-problem/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.