Re: Re: php and caching

From: Date: Mon, 25 Nov 2002 00:14:09 +0000
Subject: Re: Re: php and caching
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-125847@lists.php.net to get a copy of this message
At 01:04 25.11.2002, Alex said: --------------------[snip]-------------------- >If the page itself is never cached to force dynamic php pages to always be >"fresh", is there a way to cache only images to reduce bandwidth usage? --------------------[snip]-------------------- Alex, images are a separate "page" if you want; the browser issues a separate request for the image which is only _referenced_ by the page, not _contained_ within. As such the caching requirements for an image are unique and absolutely not connected to the caching restrictions of the page it is referenced from. That said: if your page is non-cacheable, images it contains will still be cached if the server allows this. If you're image tags look like this: <img src="../images/somepic.gif"> it's most likely the image will be cached (like any other "static" file). For a tag like <img src="../imgdb/getimg.php?id=4711"> the script "getimg.php" would need to issue the appropriate cache directives to allow caching. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#125847) next »