'Is there a way to stop a page from auto refreshing when I use Inspect Element

Every time I open inspect element on this page, it starts auto refreshing, it does this every time the inspect element tab is open, and it stops whenever the inspect element tab is closed



Solution 1:[1]

Use onbeforeunload

// This code will display dialog with Reload or Cancel buttons
window.onbeforeunload = function(event) { return false};

Note: You can inject code at start of page using tools like Tampermonkey

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1