Re: Can Safari 3 be forced to cache a large jpeg with PHP headers?

From: Date: Wed, 14 May 2008 08:46:06 +0000
Subject: Re: Can Safari 3 be forced to cache a large jpeg with PHP headers?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-274289@lists.php.net to get a copy of this message
Chris wrote:
Rob Gould wrote:
I am creating a touch-screen kiosk application, using a full-screen version of Safari 3.1, and was wondering if there's a way I can force Safari to cache a large background image JPEG. What I'm finding is that Safari 3 will sometimes cache my large 1.1 MB background image (1680x1050), and display perfectly fine, but on occassion Safari 3 will "think about the cache" and Flash the screen white for a millisecond and then draw the screen. Firefox doesn't seem to have this problem, so unfortunately this is a Safari 3 only issue. I really only want to cache this ONE image - - - nothing else. Is that possible?
How are you sending it? through a php script or through a normal html tag? If it's through a php script, try setting a far-future expiry header.
Yeah PHP can send out appropriate headers to tell the browser to cache the content delivered. You just use header() with appropriate Cache-Control and Pragma etc. headers. There are lots of good resources out there on how to do this so just google around now you know the concept :) Col

« previous php.general (#274289) next »