38,6 → 38,8 |
|
require_once __DIR__ . '/includes/functions.inc.php'; |
|
error_reporting(0); |
|
if (!isset($_SERVER['HTTP_USER_AGENT'])) { |
$out = '/* ERROR: No User Agent available */'; |
httpOutWithETag($out, 'application/javascript', 'polyfill'.(MINIFY_POLYFILL ? '.min' : '').'.js'); |
46,9 → 48,9 |
$ua = $_SERVER['HTTP_USER_AGENT']; |
|
if (MINIFY_POLYFILL) { |
$cache_file = __DIR__ . '/userdata/cache/.polyfill_'.md5(implode(',',REQUIRED_POLYFILLS)).'_'.md5($ua).'.min.js'; |
$cache_file = __DIR__ . '/userdata/cache/js_polyfill_'.md5(implode(',',REQUIRED_POLYFILLS)).'_'.md5($ua).'.min.js'; |
} else { |
$cache_file = __DIR__ . '/userdata/cache/.polyfill_'.md5(implode(',',REQUIRED_POLYFILLS)).'_'.md5($ua).'.js'; |
$cache_file = __DIR__ . '/userdata/cache/js_polyfill_'.md5(implode(',',REQUIRED_POLYFILLS)).'_'.md5($ua).'.js'; |
} |
|
if (!file_exists($cache_file) || (time()-filemtime($cache_file)) > POLYFILL_CACHE_MAX_AGE) { |