diff --git src/wp-admin/load-scripts.php src/wp-admin/load-scripts.php
index 4c7d40e..e03d11d 100644
|
|
$out = ''; |
33 | 33 | $wp_scripts = new WP_Scripts(); |
34 | 34 | wp_default_scripts($wp_scripts); |
35 | 35 | |
| 36 | if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version && false === strpos( $wp_version, '-' ) ) { |
| 37 | status_header( 304 ); |
| 38 | exit(); |
| 39 | } |
| 40 | |
36 | 41 | foreach ( $load as $handle ) { |
37 | 42 | if ( !array_key_exists($handle, $wp_scripts->registered) ) |
38 | 43 | continue; |
… |
… |
foreach ( $load as $handle ) { |
41 | 46 | $out .= get_file($path) . "\n"; |
42 | 47 | } |
43 | 48 | |
| 49 | header("Etag: $wp_version"); |
44 | 50 | header('Content-Type: application/javascript; charset=UTF-8'); |
45 | 51 | header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
46 | 52 | header("Cache-Control: public, max-age=$expires_offset"); |
diff --git src/wp-admin/load-styles.php src/wp-admin/load-styles.php
index 2563e6f..45987cd 100644
|
|
$out = ''; |
30 | 30 | $wp_styles = new WP_Styles(); |
31 | 31 | wp_default_styles($wp_styles); |
32 | 32 | |
| 33 | if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version && false === strpos( $wp_version, '-' ) ) { |
| 34 | status_header( 304 ); |
| 35 | exit(); |
| 36 | } |
| 37 | |
33 | 38 | foreach ( $load as $handle ) { |
34 | 39 | if ( !array_key_exists($handle, $wp_styles->registered) ) |
35 | 40 | continue; |
… |
… |
foreach ( $load as $handle ) { |
54 | 59 | } |
55 | 60 | } |
56 | 61 | |
| 62 | header("Etag: $wp_version"); |
57 | 63 | header('Content-Type: text/css; charset=UTF-8'); |
58 | 64 | header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
59 | 65 | header("Cache-Control: public, max-age=$expires_offset"); |