Re: Preloading images stored in a database
- From: Joost Diepenmaat <joost@xxxxxxxxx>
- Date: Fri, 18 Jul 2008 20:53:56 +0200
Keith Hughitt <keith.hughitt@xxxxxxxxx> writes:
[ ... ]Also, some clever HTTP caching can reduce the server load for images
quite a bit, making the relative slowness of the database less of an
issue.
Could you recommend any good places to start learning about how this
might be done?
In short, you need to send out the right HTTP headers to make caching
possible, and if at all possible, you want URLs to images to *never*
change the content so you can set extemely long caching times, IOW,
new versions of the same image should get a new URL (probably by
adding a version nr or timestamp to the url).
Once that's done, any standard http caching proxy (like
http://www.squid-cache.org/ ) can be put "in front" of the webserver
and it will keep any duplicate requests from getting to the web server
doing this correctly can also help browsers to cache files
locally. You can even create distributed stacks of caches and/or CDNs
to spread the load over more machines.
http://www.mnot.net/cache_docs/ seems to be a reasonable introduction.
All this works not just for images, but for any HTTP resource, but
images are especially important because they tend to make up the bulk
of the traffic of most sites, and other resources tend to change more
often, making long-term caching more challenging.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
.
- References:
- Preloading images stored in a database
- From: Keith Hughitt
- Re: Preloading images stored in a database
- From: Thomas 'PointedEars' Lahn
- Re: Preloading images stored in a database
- From: Bart Van der Donck
- Re: Preloading images stored in a database
- From: Joost Diepenmaat
- Re: Preloading images stored in a database
- From: Keith Hughitt
- Preloading images stored in a database
- Prev by Date: Re: Preloading images stored in a database
- Next by Date: Re: Can't get value into html form field
- Previous by thread: Re: Preloading images stored in a database
- Next by thread: Re: Preloading images stored in a database
- Index(es):
Relevant Pages
|