Viewing 1 replies (of 1 total)
  • I just found this plugin. Haven’t tried it yet but it looks good and will hopefully save me much time. It seems from lines 33–47 of the wp-js-compress.php file in the version 2.0.6 code, that the gzip’d version is indeed cached.

    if(extension_loaded('zlib') && substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){
    		ob_start('ob_gzhandler');
    		header('Content-Encoding: gzip');
    	} else {
    		ob_start();
    	}
    
    	header("Content-type: text/javascript; charset: UTF-8");
    	header("Cache-Control: max-age=".$wp_js['cache']);
    	header("Expires: " .gmdate("D, d M Y H:i:s", time() + $wp_js['cache']) . " GMT");
    
    	if (!wp_js_is_expired($wp_js['file']) && @file_exists('cache/'.wp_js_filename($wp_js['file']))) {
    			include('cache/'.wp_js_filename($wp_js['file']));
    	 } else {
    		ob_start("wp_js_clean");

    peace~

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP JS] Is the gzip’d file cached?’ is closed to new replies.