From 2c57e7254d613683ec20076d37b33ea2a7dd2d83 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 26 Dec 2013 20:11:18 +0100 Subject: Favicons : test pour améliorer le cache HTTP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test d'utilisation de PATH_INFO plutôt que QUERY_STRING pour améliorer la mise en cache. À tester sur différents serveurs --- p/f.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'p') diff --git a/p/f.php b/p/f.php index 872b8cc2c..660128a59 100644 --- a/p/f.php +++ b/p/f.php @@ -36,7 +36,14 @@ function download_favicon ($website, $dest) { return true; } -$id = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '0'; +if (isset($_SERVER['PATH_INFO'])) { + $id = substr($_SERVER['PATH_INFO'], 1); +} elseif (isset($_SERVER['QUERY_STRING'])) { + $id = $_SERVER['QUERY_STRING']; +} else { + $id = '0'; +} + if (!ctype_xdigit($id)) { $id = '0'; } -- cgit v1.2.3