搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Stop web page from asking me if really want to leave

more options

gmail stops me from leaving

gmail stops me from leaving

所有回覆 (6)

more options

This can be a useful feature to avoid losing unsaved work in progress --

-- but some sites may abuse it. Unfortunately, I'm not aware of a way to disable the "hook" for this only for some sites, it's all or none.

If you want to try it anyway:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste beforeunload and pause while the list is filtered

(3) To completely block all sites from hooking into this event, double-click the dom.disable_beforeunload preference to switch the value from false to true

more options

That fix did work until a few days ago, but even though about:config is set to dom.disable_beforeunload True, firefox stops the page from redirecting out of gmail.

more options

Quote: firefox stops the page from redirecting out of gmail.

Are you opening an external link when this happens? Are you composing a new message ?

Did you make changes on about:config to how links are opened?

For links opened via JavaScript you can look at this pref:

由 cor-el 於 修改

more options

What does the message look like?

Is it some kind of outbound link or redirect warning?

more options

the message is: firefox prevented this page from automatically redirecting to another page. I thought it was just when I was in gmail, but now it's other pages as well. the about:config dom...was already changed to true

more options

davidready said

the message is: firefox prevented this page from automatically redirecting to another page.

Different issue. Undo the first preference change and:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box above the list, type or paste access and pause while the list is filtered

(3) If the accessibility.blockautorefresh preference is bolded and "modified" or "user set" to true, double-click it to restore the default value of false