NYCPHP Meetup

[nycphp-talk] Caching only images

max goldberg max at idsociety.com
Thu Apr 3 11:27:07 EST 2003


One thing you could try doing is having all of your images go through a 
php script, send some cache headers, then output the image.
Alternatively you could see if there was something you could put in a 
.htaccess that would do the same thing.

This may or may not work but it's definately worth a try.

For more info on caching headers see 
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

-m


Hans Zaunere wrote:
> This was the message that started the hailstorm, so I figure I'll jump in and
> test the waters :)
> 
> --- NYPHP <info at aumcomputers.com> wrote:
> 
>>Hello Peeps, 
>>
>>Is it possible to cache only images at my ISP? My exact situation is that
>>my site has thousands of images, that I want to share among lot of users
>>without loading it from server each time. I know i can use browser cache,
>>but it can store whole documents including images but it works for 1 client
>>only and I don't want to cache whole document, but i just want to cache
>>only images. Morover I prefer to cache images on my ISP server rather than
>>relying on client's browser cache. 
> 
> 
> Assuming I understand completly, the answer is no.
> 
> 
>>In short if user A request a page that laods from server then ISP should
>>retain all images on it's cache and when user B request same page or a such
>>page that contains same images, then images should be loaded from that ISP
>>only not by loading it from my server so that I can save my valuable
>>Bandwidth.
> 
> 
> No - you have no control over how other people access your site.  If user is
> using an ISP that uses caching, and you have proper caching headers set on
> your pages, then it'll save you bandwidth.  But you have no way of enforcing
> this.
> 
> That said, there is a *slight* chance that you could work something out with
> *your* ISP, whereby they cache content for you, and for some insane reason
> would charge you less for the bandwidth used, but this is all highly
> unlikely.
> 
> H
> 
> 
> =====
> Hans Zaunere
> President, New York PHP
> http://nyphp.org
> hans at nyphp.org
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 
> 




More information about the talk mailing list