<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: How to Enable Client-Side Caching of Resized Images</title>
	<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/</link>
	<description>Writing, Designing, and Making Money Online</description>
	<pubDate>Fri, 25 Jul 2008 12:59:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: suleiman</title>
		<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-1624</link>
		<dc:creator>suleiman</dc:creator>
		<pubDate>Thu, 17 Apr 2008 22:55:58 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-1624</guid>
		<description>is there a way to set expire headers for images that are not hosted on your server?</description>
		<content:encoded><![CDATA[<p>is there a way to set expire headers for images that are not hosted on your server?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NL</title>
		<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-1478</link>
		<dc:creator>NL</dc:creator>
		<pubDate>Sat, 12 Apr 2008 08:20:26 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-1478</guid>
		<description>Apaches default behavour is to disable caching as much as possible. That is why default headers are applied.

You should be able to do:

-- start of code --
// Expire in 1 day
$oDate = mktime(date('H'), date('i'), date('s'), date('m'), date('d') + 1, date('Y'));
header('Expires: ' . date('D, d M Y H:i:s', $oDate) . ' GMT');
-- end of code --

But some servers override the expire-header anyway :(</description>
		<content:encoded><![CDATA[<p>Apaches default behavour is to disable caching as much as possible. That is why default headers are applied.</p>
<p>You should be able to do:</p>
<p>&#8211; start of code &#8211;<br />
// Expire in 1 day<br />
$oDate = mktime(date(&#8217;H'), date(&#8217;i'), date(&#8217;s&#8217;), date(&#8217;m'), date(&#8217;d') + 1, date(&#8217;Y'));<br />
header(&#8217;Expires: &#8216; . date(&#8217;D, d M Y H:i:s&#8217;, $oDate) . &#8216; GMT&#8217;);<br />
&#8211; end of code &#8211;</p>
<p>But some servers override the expire-header anyway <img src='http://www.earn-web-cash.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NL</title>
		<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-1477</link>
		<dc:creator>NL</dc:creator>
		<pubDate>Sat, 12 Apr 2008 08:19:12 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-1477</guid>
		<description>Apaches default behavour is to disable caching as much as possible. That is why default headers are applied.

You should be able to do:


But some servers override the expire-header anyway :(</description>
		<content:encoded><![CDATA[<p>Apaches default behavour is to disable caching as much as possible. That is why default headers are applied.</p>
<p>You should be able to do:</p>
<p>But some servers override the expire-header anyway <img src='http://www.earn-web-cash.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-605</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Mon, 10 Mar 2008 11:11:14 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-605</guid>
		<description>ok, I moved the cache control under the content-type:
header('Content-type: image/jpeg');
header('Cache-Control: max-age=3600');

and now the reponse header is saying 3600 instead of '	no-store, no-cache, must-revalidate, post-check=0, pre-check=0'

however I am still getting a passed expiry date.
as in the following reponse headers:

Date	Mon, 10 Mar 2008 11:10:17 GMT
Server	Apache/1.3.39 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_jk/1.2.14 mod_ssl/2.8.30 OpenSSL/0.9.7a PHP-CGI/0.1b
Cache-Control	max-age=3600
Expires	Thu, 19 Nov 1981 08:52:00 GMT
Pragma	no-cache
X-Powered-By	PHP/5.2.1
Keep-Alive	timeout=15, max=66
Connection	Keep-Alive
Transfer-Encoding	chunked
Content-Type	image/jpeg

any idea why the expiry date would be in the past, the server time is correct
Pat</description>
		<content:encoded><![CDATA[<p>ok, I moved the cache control under the content-type:<br />
header(&#8217;Content-type: image/jpeg&#8217;);<br />
header(&#8217;Cache-Control: max-age=3600&#8242;);</p>
<p>and now the reponse header is saying 3600 instead of &#8216;	no-store, no-cache, must-revalidate, post-check=0, pre-check=0&#8242;</p>
<p>however I am still getting a passed expiry date.<br />
as in the following reponse headers:</p>
<p>Date	Mon, 10 Mar 2008 11:10:17 GMT<br />
Server	Apache/1.3.39 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_jk/1.2.14 mod_ssl/2.8.30 OpenSSL/0.9.7a PHP-CGI/0.1b<br />
Cache-Control	max-age=3600<br />
Expires	Thu, 19 Nov 1981 08:52:00 GMT<br />
Pragma	no-cache<br />
X-Powered-By	PHP/5.2.1<br />
Keep-Alive	timeout=15, max=66<br />
Connection	Keep-Alive<br />
Transfer-Encoding	chunked<br />
Content-Type	image/jpeg</p>
<p>any idea why the expiry date would be in the past, the server time is correct<br />
Pat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-603</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Mon, 10 Mar 2008 09:45:31 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-603</guid>
		<description>Hey, cheers for the tute.

I couldnt seem to get it to cache still, would calling the script through htaccess rewrite make any difference?

ie www.domain.com/image/4.jpg

Pat</description>
		<content:encoded><![CDATA[<p>Hey, cheers for the tute.</p>
<p>I couldnt seem to get it to cache still, would calling the script through htaccess rewrite make any difference?</p>
<p>ie <a href="http://www.domain.com/image/4.jpg" rel="nofollow">http://www.domain.com/image/4.jpg</a></p>
<p>Pat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-546</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Thu, 06 Mar 2008 16:21:11 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/03/01/php-cache-resized-images/#comment-546</guid>
		<description>Works like a charm!

Works in every browser (FF, IE, Safari, Opera..etc)</description>
		<content:encoded><![CDATA[<p>Works like a charm!</p>
<p>Works in every browser (FF, IE, Safari, Opera..etc)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
