mibere
April 8, 2018, 11:03am
1
There are a lot of help requests where the solution is to flush the browser cache.
Is it maybe possible and helpful to set some cache-meta-tags in the Head section of the website source (at least on the main site)?
Do you mean a tag, such as ftldns
? It's a big problem for sure, but not big enough for a category ...
DL6ER
April 8, 2018, 11:14am
3
No, he means an HTTP meta tag, such as
<meta http-equiv="Cache-control" content="max-age=600,private">
1 Like
mibere
April 8, 2018, 11:14am
4
No, I mean the Pi-hole website and some sort of cache-expiry tags on http://192.x.x.x/admin/index.php
/EDIT: DL6ER, yes, something like this.
DL6ER
April 8, 2018, 11:22am
5
See
pi-hole:FTLDNS
← pi-hole:FTLDNS-cache-control
opened 11:21AM - 08 Apr 18 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have re… ad and understood the [contributors guide](https://github.com/pi-hole/AdminLTE/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [X] I have Signed Off all commits. ([`git commit --signoff`](https://git-scm.com/docs/git-commit#git-commit---signoff))
---
**What does this PR aim to accomplish?:**
Resolve problems with stalled browser caches we see after nearly each update of Pi-hole. These issues are 99% resolved by cache clearing or force refreshing.
**How does this PR accomplish the above?:**
Add `cache-control` meta tag to all Pi-hole dashboard pages to control that caching may only be done in end-user browsers and not put into a cache that is shared among users on the same system (`private`). The private directive means it is specific to one person. Also, we specify that the cache may be renewed every minute (`max-age=60`). The latter may be too restrictive, but I think it is a fair compromise to mitigate those issues after updates.
>
**What documentation changes (if any) are needed to support this PR?:**
None
P.S.: I honestly though we had those in. I think we did, but apparently someone cleaned the headers at some point and may has accidentally removed this meta tag.
2 Likes
mibere
April 8, 2018, 12:04pm
6
Let's hope that this small fix solves a lot of trouble
Mcat12
April 9, 2018, 12:54am
7
Also, the new web interface will not have this cache problem because the built files have a unique hash in the file name: GitHub - pi-hole/web: Pi-hole Web Interface for viewing stats and managing your Pi-hole
2 Likes