[thelist] sigh...caching issue again!

Erick Papadakis erick_papadakis at yahoo.com
Tue Jul 2 01:39:01 CDT 2002


hello, i am sure this is a breeze of a question for
some of you, but really, i have searched a lot but
have found no solution that works for me.

what i need to is simple: to cache ('preload'?) my
images when a user comes to my website on first page.
same images are used all through my websie but it
seems that each page is loading the images again and
again!

i tried looking at cache pragma HTTP-EQUIV tags etc,
but most websites suggest not to do this and send php
http headers instead. so here is what i am doing:

    header("Expires: Mon, 26 Jul 2007 05:00:00 GMT");
  // Date in the future
    header("Cache-Control: store, cache");  //
HTTP/1.1
    header("Cache-Control: post-check=120,
pre-check=240", false);


i am not sure if this really works at all because the
images seem to be loaded everytime! in IE, opera as
well as in netscape! in my HTML, inside the javascript
source tags, i do this to preload:

    bg           = new Image();
    bg.src       = "bg.gif";
    spacer       = new Image();
    spacer.src   = "spacer.gif";

    ...and so on for every image....


what can i do? is there something to be done in
PHP/HTML? something on the server config etc? how can
i cache the images so they dont load everytime?

help!
erick

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



More information about the thelist mailing list