From c64918f839febe483fdfe91901f7874699f0eca6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 12 Oct 2016 09:49:38 +0200 Subject: Randomize favicon refresh https://github.com/FreshRSS/FreshRSS/issues/1298 --- p/f.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p/f.php b/p/f.php index 6523cc759..df3e4b5f3 100644 --- a/p/f.php +++ b/p/f.php @@ -71,7 +71,7 @@ $txt_mtime = @filemtime($txt); header('Content-Type: image/x-icon'); -if ($ico_mtime == false || $txt_mtime > $ico_mtime || ($ico_mtime < time() - 15 * 86400)) { +if ($ico_mtime == false || $txt_mtime > $ico_mtime || ($ico_mtime < time() - (rand(15, 20) * 86400))) { if ($txt_mtime == false) { show_default_favicon(1800); exit(); @@ -92,6 +92,6 @@ if ($ico_mtime == false || $txt_mtime > $ico_mtime || ($ico_mtime < time() - 15 header('Content-Disposition: inline; filename="' . $id . '.ico"'); -if (!httpConditional($ico_mtime, 2592000, 2)) { +if (!httpConditional($ico_mtime, rand(14, 21) * 86400, 2)) { readfile($ico); } -- cgit v1.2.3 From f080774059232de636d08a0ad76bb60fd91be657 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 12 Oct 2016 09:59:27 +0200 Subject: Changelog randomize favicon refresh https://github.com/FreshRSS/FreshRSS/issues/1298 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f05b77c8..68967bbba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ * In a multi-user context, take better advantage of other users’ refreshes [#1280](https://github.com/FreshRSS/FreshRSS/pull/1280) * Support custom ports `localhost:3306` for database servers [#1241](https://github.com/FreshRSS/FreshRSS/issues/1241) * Add date to exported files [#1240](https://github.com/FreshRSS/FreshRSS/issues/1240) - * Auto-refresh favicons after 15 days [#1181](https://github.com/FreshRSS/FreshRSS/issues/1181) + * Auto-refresh favicons once or twice a month [#1181](https://github.com/FreshRSS/FreshRSS/issues/1181), [#1298](https://github.com/FreshRSS/FreshRSS/issues/1298) * Bug fixing * Correction of bugs related CSRF tokens introduced in version 1.5.0 [#1253](https://github.com/FreshRSS/FreshRSS/issues/1253), [44f22ab](https://github.com/FreshRSS/FreshRSS/pull/1261/commits/d9bf9b2c6f0b2cc9dec3b638841b7e3040dcf46f) * Fix bug in Global view introduced in version 1.5.0 [#1269](https://github.com/FreshRSS/FreshRSS/pull/1269) -- cgit v1.2.3