Back-forward cache (bfcache) in browsers.
You can use persisted property to check if a page has been loaded from the bfcache:
window.addEventListener('pageshow', (event) => {
if (event.persisted) {
console.log('This page was restored from the bfcache.');
} else {
console.log('This page was loaded normally.');
}
});