big doh @ me, didn't notice t'was php.

seems you already solved it anyway!

On Dec 18, 5:49 pm, Ricardo Tomasi <ricardob...@gmail.com> wrote:
> If you have SSI enabled on your server the Last-modified header won't
> be sent, it should be sent for all static pages.
>
> On Dec 18, 5:15 pm, Magnificent
>
> <imightbewrongbutidontthin...@gmail.com> wrote:
> > I'm making some progress, if I include the following:
>
> > <?php
> > $last_modified = filemtime("test.txt");
> > header("Last-Modified: " . $last_modified);
> > ?>
>
> > I get a response header with:
> > Last-Modified   1229624249
>
> > If I then wait a bit and make a change to cause test.txt to be
> > updated, I get:
>
> > Last-Modified   1229627412
>
> > So I'm definitely getting the Last-Modified header sent but all the
> > responses still show up as 200.  I should be getting 304s until
> > test.txt is updated, then get one 200, then more 304s until test.txt
> > is update again, right?
>
> > On Dec 18, 11:05 am, Mike Alsup <mal...@gmail.com> wrote:
>
> > > > I take it back, my livedata_fetch.php is coming back with a 200
> > > > status, but I want it coming back with a 304 not modified, right?
> > > > That means it'll only fetch the file if it's been updated since the
> > > > last time it was fetched?
>
> > > Right.  The server needs to set the Last-Modified header for this to
> > > work correctly.  If it does, jQuery will use that date/time in the If-
> > > Modified-Since header.  If the resource has not been modified then the
> > > server should return an empty response body with a 304 status.

Reply via email to