Cache enabler supports sending an HTTP response 304 with an empty body:
|
if ( strtotime( self::$request_headers['If-Modified-Since'] >= filemtime( $cache_file ) ) ) { |
|
header( self::sanitize_server_input( $_SERVER['SERVER_PROTOCOL'] ) . ' 304 Not Modified', true, 304 ); |
|
exit; // Deliver empty body. |
|
} |
However the header for this to work is never sent: Last-Modified: Tue, 09 Dec 2025 08:02:34 GMT.
Explanation: When wordpress generates a webpage, it should provide the Last-Modified header, in order for the browser to provide this header on a refresh request. If the header is not present, then the 304 response can never be provided.
Update: Also Cache-Control or Expires is needed for the browser to know when to do a conditional request.
Cache enabler supports sending an HTTP response 304 with an empty body:
cache-enabler/inc/cache_enabler_engine.class.php
Lines 463 to 466 in 4039d1a
However the header for this to work is never sent:
Last-Modified: Tue, 09 Dec 2025 08:02:34 GMT.Explanation: When wordpress generates a webpage, it should provide the
Last-Modifiedheader, in order for the browser to provide this header on a refresh request. If the header is not present, then the 304 response can never be provided.Update: Also
Cache-ControlorExpiresis needed for the browser to know when to do a conditional request.