I want to reload an image on a page if it has been updated on the server. In other questions it has been suggested to do something like
newImage.src = "http://localhost/image.jpg?" + new Date().getTime();
to force the image to be re-loaded, but that means that it will get downloaded again even if it really hasn't changed.
Is there a...
My PHP script depends on being able to read the value of the If-Modified-Since header (yes, I know how to do this).
It worked correctly when I used PHP as mod_php, but now that I've switched to suPHP (CGI), it appears Apache itself handles requests that contain this header, without forwarding them to PHP at all.
This is silly, because...
My Browser isn't sending back an If-Modified-Since Header for PHP generated Content
on the first request my script sends:
(Status-Line) HTTP/1.1 200 OK
Date Thu, 21 Jan 2010 08:55:25 GMT
Server Apache/2.2.11 (Win32) PHP/5.2.9-1
X-Powered-By PHP/5.2.9-1
Pragma no-cache
x-ua-compatible IE=8;FF=3;OtherUA=4
Last-Modfied Sat, 02 Jan 2010 02...
There seem to be two distinct ways to implement conditional requests using HTTP headers, both of which can be used for caching, range requests, concurrency control etc...:
If-Unmodified-Since and If-Modified-Since, where the client sends a timestamp of the resource.
If-Modified and If-None-Modified, where the client sends an ETag repre...
Hi,
Any ideas why on some links that I try to access using HttpWebRequest I am getting "The remote server returned an error: (304) Not Modified." in the code?
The code I'm using is from Jeff's post here.
Note the concept of the code is a simple proxy server, so I'm pointing my browser at this locally running piece of code, which gets ...
As far as I understand the specs, the ETag, which was introduced in RFC 2616 (HTTP/1.1) is a predecessor of the Last-Modified-Header, which is proposet to give the software-architect more controll over the cache-revalidating process.
If both Cache-Validation-Headers (If-None-Match and If-Modified-Since) are present, according to RFC 261...
I've got a site with a basic login/logout system.
When I display pages I do a check to see when the page was last modified and if the browser has sent an if modified since header. If it hasn't been modified I send a 304 header and exit.
This obviously loads the page alot quicker and means less memory and processing power for me as I do...
I have an expensive WebRequest that I know can be cached.
Is there an existing solution that allows caching of web requests based on Last-Modified/If-Modified-Since and (optionally) ETags?
...
I have a page with lots of small images (icons). When used with chrome, each time the page is reloaded, chrome requests each icon from the server with if-modified-since header.
All icons are served with expires and max-age headers. Firefox loads images from its cache.
Why is chrome doing that and how can I prevent it?
Thanks
...