summaryrefslogtreecommitdiff
path: root/p/f.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-12 09:49:38 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-12 09:49:38 +0200
commitc64918f839febe483fdfe91901f7874699f0eca6 (patch)
treef0928915833eeffa2d15eba4fa7b946703e03622 /p/f.php
parent3e158b5e7490cf4f7ecd7c35a6738f035378513d (diff)
Randomize favicon refresh
https://github.com/FreshRSS/FreshRSS/issues/1298
Diffstat (limited to 'p/f.php')
-rw-r--r--p/f.php4
1 files 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);
}