Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
daegloe
· 14y ago · 0 comments
Is this really necessary when you already have browser caching? Which is fairly robust/mature across the market.
Comments
[–]
dominictarr
14y ago
the problem with browser caching is that you cannot control when you want it to update, except with a timeout.
[–]
abend
14y ago
Timeout isn't the only way. You could set a version variable on pageload, and have a conditional version check on init. If the versions match and localstorage exists, load from localstorage, if not, grab from the server and update.