I have a PHP file that will return the same thing with the same $_GET parameters every time -- it\'s deterministic.
Unfortunately for efficiency (this file is reques
Without caching the page yourself (or at least its Etag) you cannot really make use of the 304. A full fledged caching algorithm is somewhat out of scope, but the general idea:
//the actual page
All common pitfalls apply: you can possibly not display cache pages for logged in users, a caching of partial content could be more desirable, you are yourself responsible for preventing stale content in the cache (possibly using triggers in backend or database on modifications, or just playing around with the getUrlEtag
logic), etc. etc.
You could also play around with HTTP_IF_MODIFIED_SINCE
if that's easier to control.