Forum Moderators: phranque
when i manually send a last modified header with my dynamic pages, everytime i press reload, the page-load pauses half way through for a few seconds.
if i ctrl + refresh i get a normal page load.
this pause only happens when
a) i reload dynamic pages (static html pages are delivered normally)
b) when i manually send a last modified header (if i leave it out or use an expires header instead, the dynamic pages load normally)
why is the last modified header causing this? the headers which are sent for dynamic and/or static pages are identical.
much appreciate any help!
If you run PHP and want to add processing for either of the above, look at this thread [webmasterworld.com]. Not a direct answer, but the best I can offer (except for trudging through httpd.conf, of course).
i send all the correct headers myself using header(), albeit not nearly as elegantly or as thoroughly as you do.
comparing the headers of one of my static pages with one of the dynamic pages returns *exactly* the same results - hence my puzzlement.
however i have now tracked it down to the function call i use which checks the HTTP_IF_NONE_MATCH and HTTP_IF_MODIFIED_SINCE and if they don't match, then returns
header('HTTP/1.0 304 Not Modified');
exit();
it seems as though i am missing an ob_end_clean(); before the exit. now the page loads perfectly.
obviously your post provided the inspiration :)
thanks