The user should be making the choice - not the website. The website could be informed about being backgrounded, if the user chooses to. But the user should have the priority in the decision chain - their choice overrides any that the website makes.
That is what it means to have control over your own computing.