“storage” event is fired when another window that shares the same storage area (localStorage or sessionStorage) updates that storage area.
“storage” event is fired when another window that shares the same storage area (localStorage or sessionStorage) updates that storage area.
For myself:
Email enumeration attack.
It’s when an attacker can check if an email exists in a system (for example, on password reset forms, with “There’s no such email in the system” error messages).
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.');
}
});
A really good blogpost.
The idea is that you can use separate pages instead of creating interactive JS-powered elements.
Link.
Just found out that if an image has loading="lazy",
it won’t be requested if it’s not visible (display:none).