kingram Posted September 21, 2005 Share Posted September 21, 2005 (edited) Hope the topic will fit in this category. It might be odd but I was thinking to make the favicon.icon in the address bar to change. So hopefully I made a couple of icons and put them in the folder and used the images rotator to rotate the images and left the rotator.php in the header of the index.html Now the favicon rotates in the Firefox each time I restart the firefox and do not rotate in IE. Here is the question obviously: what should I do that each time everyone refreshes the page in Firefox can have a new favicon. The Answer might be very simple for some coder out there but I do not know how I should clear the cache. Thanks for help Tavakoli.ws/pblog Edited September 21, 2005 by kingram Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted September 21, 2005 Share Posted September 21, 2005 Take a look here. Quote Link to comment Share on other sites More sharing options...
kingram Posted September 22, 2005 Author Share Posted September 22, 2005 I still can not get it rotating. It some times rotate by chance and I do not know how to go around with the problem. Any suggestion. Quote Link to comment Share on other sites More sharing options...
dkotchen Posted September 22, 2005 Share Posted September 22, 2005 In the rotator.php code, add the lines shown in red below (these lines add headers that will prevent your image from being cached): if ($img!=null) { $imageInfo = pathinfo($img); $contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ]; header ($contentType); header ("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header ("Expires: Fri, 05 Jul 2002, 05:00:00 GMT"); // date in the past readfile($img); } else { if ( function_exists('imagecreate') ) { header ("Content-type: image/png"); header ("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header ("Expires: Fri, 05 Jul 2002, 05:00:00 GMT"); // date in the past $im = @imagecreate (100, 100) or die ("Cannot initialize new GD image stream"); $background_color = imagecolorallocate ($im, 255, 255, 255); $text_color = imagecolorallocate ($im, 0,0,0); imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color); imagepng ($im); imagedestroy($im); } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.