JBZoo\Utils\Http::nocache PHP Méthode

nocache() public static méthode

Different browsers support different nocache headers, so several headers must be sent so that all of them get the point that no caching should occur
public static nocache ( ) : boolean
Résultat boolean
    public static function nocache()
    {
        if (!headers_sent()) {
            header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
            header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
            header('Cache-Control: no-cache, must-revalidate, max-age=0');
            header('Pragma: no-cache');
            return true;
        }
        return false;
    }