Prevent browser from caching at all.

This commit is contained in:
Daniel Winzen
2016-08-17 14:50:31 +02:00
parent 0d9a9de558
commit 2ab29a0014
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ Prevent posting the same message twice, if no other message was posted in-betwee
Instruct browser not to send referrer. Instruct browser not to send referrer.
Enable image embedding without cookies as there is no more risk of session leakage. Enable image embedding without cookies as there is no more risk of session leakage.
Allow configuring password and nickname regex Allow configuring password and nickname regex
Prevent browser from caching at all.
Version 1.20.6 - Jul. 23, 2016 Version 1.20.6 - Jul. 23, 2016
Simplify ignore logic + disallow ignoring chatters with higher status Simplify ignore logic + disallow ignoring chatters with higher status

View File

@ -3087,7 +3087,7 @@ function sort_names(&$names){
function send_headers(){ function send_headers(){
header('Content-Type: text/html; charset=UTF-8'); header('Content-Type: text/html; charset=UTF-8');
header('Pragma: no-cache'); header('Pragma: no-cache');
header('Cache-Control: no-cache'); header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0');
header('Expires: 0'); header('Expires: 0');
header('Referrer-Policy: no-referrer'); header('Referrer-Policy: no-referrer');
header('Content-Security-Policy: referrer never'); header('Content-Security-Policy: referrer never');
@ -3688,7 +3688,7 @@ function load_html(){
global $H, $I, $language; global $H, $I, $language;
$H=array(// default HTML $H=array(// default HTML
'form' =>"form action=\"$_SERVER[SCRIPT_NAME]\" method=\"post\"", 'form' =>"form action=\"$_SERVER[SCRIPT_NAME]\" method=\"post\"",
'meta_html' =>'<meta name="robots" content="noindex,nofollow"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="expires" content="0"><meta name="referrer" content="no-referrer">', 'meta_html' =>'<meta name="robots" content="noindex,nofollow"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate, max-age=0"><meta http-equiv="expires" content="0"><meta name="referrer" content="no-referrer">',
'credit' =>'<small><br><br><a target="_blank" href="https://github.com/DanWin/le-chat-php">LE CHAT-PHP - ' . VERSION . '</a></small>', 'credit' =>'<small><br><br><a target="_blank" href="https://github.com/DanWin/le-chat-php">LE CHAT-PHP - ' . VERSION . '</a></small>',
'commonform' =>hidden('lang', $language).hidden('nc', substr(time(), -6)) 'commonform' =>hidden('lang', $language).hidden('nc', substr(time(), -6))
); );