Skip to content

Append Unix timestamp for cache invalidation - #33

Merged
EdOverflow merged 1 commit into
securitytxt:masterfrom
joker314:feat/cache-bust
Mar 10, 2019
Merged

EdOverflow merged 1 commit into
securitytxt:masterfrom
joker314:feat/cache-bust

Conversation

@joker314

@joker314 joker314 commented Mar 9, 2019

Copy link
Copy Markdown
Contributor

Resolves #32

Append the number of seconds since 1970-01-01 to the URLs of internal resources in order to force a re-request of JavaScript, CSS and HTML when the site is re-built. This is so that the HTML, CSS, and JS are always synchronised.

This is important because sometimes JavaScript will encounter a fatal error if the HTML is not what is expected.

Only internal links (I only found two) are targetted, because they aren't expected to change at site build time, but instead at a more controlled moment. We can always append the timestamp in future and this will invalidate any current caches.

@EdOverflow
EdOverflow merged commit 6729c4a into securitytxt:master Mar 10, 2019
@EdOverflow

Copy link
Copy Markdown
Member

Clever solution!

@joker314
joker314 deleted the feat/cache-bust branch March 10, 2019 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants