You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Wheeler <bd...@indiana.edu> on 2001/09/10 18:19:14 UTC

AxKit & Last-Modified header

Since AxKit is down and this is really a mod-perl issue, I'll ask it
here :)

I'm having problems with the browser caching to much info.  Here's my
situation:  I'm using authcookie to do authentication and my pages are
generated via axkit.  after logging in (and the cookie set), the browser
decides its already seen the pages and doesn't re-request the page
(which has login status on it).

AxKit is doing caching correctly (I've wrote an extension which handles
the login status).

If I set it to no-cache, I can't use the back button on forms.  Using
normal caching, it works ok on all the dynamic pages (CGI and
Apache::ASP which generate xml which is passed to axkit) but the static
pages don't notice the change.

The only difference between the two (request-wise) is that static pages
return a "Last-Modified" header and dynamic data doesn't.  It seems to
me that if I drop that header, everything will work :)

I've tried doing:

$r->header_out("Last-Modified"=>'');
and
$r->header_out("Last-Modified"=>undef);

but the header still comes out.

Thoughts?  Am I on the right track?

Brian


Re: AxKit & Last-Modified header

Posted by Brian Wheeler <bd...@indiana.edu>.
On Wed, 2001-09-12 at 19:34, J. Zobel wrote:
> On Mon, 2001-09-10 at 16:19, Brian Wheeler wrote:
> 
> > The only difference between the two (request-wise) is that static pages
> > return a "Last-Modified" header and dynamic data doesn't.  It seems to
> > me that if I drop that header, everything will work :)
> > 
> > I've tried doing:
> > 
> > $r->header_out("Last-Modified"=>'');
> > and
> > $r->header_out("Last-Modified"=>undef);
> > 
> > but the header still comes out.
> > 
> > Thoughts?  Am I on the right track?
> 
> Do not remove Last-Modified.
> Add an Expires (Maybe even 1970).
> 
> If the page is expired, the browser will rerequest it with an
> If-Modified-Since. So you can still play the 304 game.
> 
> Hth,
> Joachim
> 


Wait...maybe it did work. :)  I think my 'log out' procedure is broken,
but it works ok for the 'log in' part :)

Thanks!
Brian



Re: AxKit & Last-Modified header

Posted by Brian Wheeler <bd...@indiana.edu>.
On Wed, 2001-09-12 at 19:34, J. Zobel wrote:
> On Mon, 2001-09-10 at 16:19, Brian Wheeler wrote:
> 
> > The only difference between the two (request-wise) is that static pages
> > return a "Last-Modified" header and dynamic data doesn't.  It seems to
> > me that if I drop that header, everything will work :)
> > 
> > I've tried doing:
> > 
> > $r->header_out("Last-Modified"=>'');
> > and
> > $r->header_out("Last-Modified"=>undef);
> > 
> > but the header still comes out.
> > 
> > Thoughts?  Am I on the right track?
> 
> Do not remove Last-Modified.
> Add an Expires (Maybe even 1970).
> 
> If the page is expired, the browser will rerequest it with an
> If-Modified-Since. So you can still play the 304 game.
> 
> Hth,
> Joachim
> 


No such luck...the browser continues to use the cached copy.

Brian


Re: AxKit & Last-Modified header

Posted by "J. Zobel" <nc...@netcologne.de>.
On Mon, 2001-09-10 at 16:19, Brian Wheeler wrote:

> The only difference between the two (request-wise) is that static pages
> return a "Last-Modified" header and dynamic data doesn't.  It seems to
> me that if I drop that header, everything will work :)
> 
> I've tried doing:
> 
> $r->header_out("Last-Modified"=>'');
> and
> $r->header_out("Last-Modified"=>undef);
> 
> but the header still comes out.
> 
> Thoughts?  Am I on the right track?

Do not remove Last-Modified.
Add an Expires (Maybe even 1970).

If the page is expired, the browser will rerequest it with an
If-Modified-Since. So you can still play the 304 game.

Hth,
Joachim