Re: Preloading images stored in a database



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/
.



Relevant Pages

  • Re: [PHP] Images in MySQL vs directory/file?
    ... Images in a database mean totally different things to ... different usage profiles. ... it can use caching to make up for the ...
    (php.general)
  • Mixed content warning
    ... This includes adding images from local disk. ... This works fine for http ... Is there a way to implement, may be, IInternetSecurityManager and respond to ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Any news on the Delphi remote control component sets mentioned back in June?
    ... the support bridge offerring? ... and I am planning to commercialize it as a component set as soon as ... reworking everything to use HTTP instead of the existing protocol. ... option) grayscale images, ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Images Not Caching.
    ... > i visit a page and the images have to load each time. ... If you have control over the server and it is an Apache server ... > it's not caching anything and is making the loading time> really really really REALLY slow. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Caching image proxy
    ... >> caching and unloading images. ... The method bellow is called when the scroll container is scrolled. ... It looks like I had not added support for freeing images when it is scrolled ... ifTrue: [thumbnailPresenter model value free]. ...
    (comp.lang.smalltalk.dolphin)