Index: trunk/phase3/includes/resourceloader/ResourceLoader.php |
— | — | @@ -293,8 +293,12 @@ |
294 | 294 | |
295 | 295 | header( 'Content-Type: ' . ( $context->getOnly() === 'styles' ? 'text/css' : 'text/javascript' ) ); |
296 | 296 | header( 'Last-Modified: ' . wfTimestamp( TS_RFC2822, $mtime ) ); |
297 | | - header( "Cache-Control: public, max-age=$maxage, s-maxage=$smaxage" ); |
298 | | - header( 'Expires: ' . wfTimestamp( TS_RFC2822, min( $maxage, $smaxage ) + time() ) ); |
| 297 | + if ( $context->getDebug() ) { |
| 298 | + header( 'Cache-Control: must-revalidate' ); |
| 299 | + } else { |
| 300 | + header( "Cache-Control: public, max-age=$maxage, s-maxage=$smaxage" ); |
| 301 | + header( 'Expires: ' . wfTimestamp( TS_RFC2822, min( $maxage, $smaxage ) + time() ) ); |
| 302 | + } |
299 | 303 | |
300 | 304 | // If there's an If-Modified-Since header, respond with a 304 appropriately |
301 | 305 | $ims = $context->getRequest()->getHeader( 'If-Modified-Since' ); |