diff options
author | jesselau76 <jesselau76@gmail.com> | 2019-03-06 13:10:07 +0300 |
---|---|---|
committer | jesselau76 <jesselau76@gmail.com> | 2019-03-06 13:10:07 +0300 |
commit | bd82fafba94aa655309e2b5c32b4281ae3efe1f3 (patch) | |
tree | 203609230bad5a7e11a933e383e586482c0e14d8 | |
parent | e4ea4e80164969e819f79f88b71b71faccf94a94 (diff) |
no cache with homepage,category and tags
-rw-r--r-- | layouts/partials/head.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ca40640..1fa23cf 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,6 +1,12 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta http-equiv="Cache-Control" content="public" /> +{{ if .IsPage }} + <meta http-equiv="Cache-Control" content="public" /> +{{else}} + <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> + <meta http-equiv="Pragma" content="no-cache" /> + <meta http-equiv="Expires" content="0" /> +{{ end }} {{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }} <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> {{ .Hugo.Generator }} |