false))); $cs = file_put_contents($cache_file, $js); //Make sure cache file gets created/updated if($cs === FALSE) { die("Cache file was not created. Make sure you have the correct folder permissions."); } } else if(isset($_GET['debug'])) { $js = get_files(); } else { $js = file_get_contents($cache_file); } // -------------------------------------------------------------------------- //This GZIPs the js for transmission to the user //making file size smaller and transfer rate quicker ob_start("ob_gzhandler"); header("Content-Type: application/x-javascript; charset=utf8"); header("Cache-control: public, max-age=691200, must-revalidate"); header("Last-Modified: ".gmdate('D, d M Y H:i:s', $last_modified)." GMT"); header("Expires: ".gmdate('D, d M Y H:i:s', (filemtime($this_file) + 691200))." GMT"); echo $js; ob_end_flush(); //end of js.php