This is experimental feature
Check if the type===navigate
then you just visit the website if type===reload
then you reload the page
//check browser reloaded then
function checkBrowserRelaoad() {
// Use getEntriesByType() to just get the "navigation" events
const perfEntries = window.performance.getEntriesByType("navigation");
for (let i=0; i < perfEntries.length; i++) {
const p = perfEntries[i];;
console.log(p?.type)
}
}
👉 Reference link
Top comments (0)