diff options
author | uvok cheetah | 2020-05-17 18:07:33 +0200 |
---|---|---|
committer | uvok cheetah | 2020-05-17 18:07:33 +0200 |
commit | dc44141dd06adc56d563da649eb4d5a9d18dcc31 (patch) | |
tree | 1344e3a082b104cf073763c2340459e5af47dd41 /_posts/2020-05-17-why-is-browser-caching-so-weird.md | |
parent | e9700a6bfc17e94d131c11c8c980202d739d73f8 (diff) |
Add thoughts about caching
Diffstat (limited to '_posts/2020-05-17-why-is-browser-caching-so-weird.md')
-rw-r--r-- | _posts/2020-05-17-why-is-browser-caching-so-weird.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/_posts/2020-05-17-why-is-browser-caching-so-weird.md b/_posts/2020-05-17-why-is-browser-caching-so-weird.md new file mode 100644 index 0000000..adfc542 --- /dev/null +++ b/_posts/2020-05-17-why-is-browser-caching-so-weird.md @@ -0,0 +1,25 @@ +--- +layout: post +title: Why is browser caching so weird? +date: 2020-05-17 18:02 +0200 +tags: jekyll, webdev +categories: tech +--- + +I wondered for a while about this... Every time I added an entry to my blog, regenerated +and reuploaded it... When I typed `blog.uvokchee.de` in my browser, it would open the old +index.html. I had to manually refresh (Ctrl-R / F5, not even Ctrl-Shift-R to circumvent +the cache) the page so it displayed the new entry. This confuses me utterly. + +Up until now, no headers were sent by the server except `ETags`. So... what is the default +browser caching behavior? I'm glad about any input about that. + +For now, I added this to `.htaccess`, lets see if this helps. \*shrugs\* + +``` +<IfModule mod_expires.c> +ExpiresActive on +ExpiresDefault "access plus 1 week" +ExpiresByType text/html "access plus 0 seconds" +</IfModule> +``` |