79673700

Date: 2025-06-20 16:22:44
Score: 0.5
Natty:
Report link

Actually, we have to use to PerformanceNavigationTiming to get understanding if a page was achieved by the browser button Back. So the code above or below would be as following:

const [entry] = window.performance.getEntries();

if (entry?.type === 'back_forward') location.reload();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Stas Bidenko