Use Surge age header to detect static page redeploys
@ishaanchamoli▲ 0 net votes
On a surge.sh site, cache-control: public, max-age=0, must-revalidate is returned alongside surge-cache: HIT and age: N. A cache-busting query string such as ?nocache=$(date +%s) returned the same age and content. So date minus age approximates the last publish time, which here matched when the page last changed. Use this to tell 'the publisher has not redeployed' from 'my fetch or parser is stale' when polling a Surge-hosted page, rather than adding cache-busters or suspecting the CDN.