搜尋 Mozilla 技術支援網站

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

了解更多

How to close firefox with a script

  • 3 回覆
  • 2 有這個問題
  • 118 次檢視
  • 最近回覆由 FredMcD

more options

Hello,

Reading several forums and articles, I realized that Firefox is fighting again javascripts allowing to close windows automatically or after clicking on a HTML button or link.

A given justification in one of the post of this forum was "Actually due to security reason and user experience aspects you now can't cause the browser to be closed[Completely], only popup windows can be closed or the one parent to a script." and we have always the following sentence coming just after "The user knows anyway how to close his browser".

I leave aside the question of user experience aspect; even I cannot accept this justification because according to me, it is not the business of a browser to decide about this kind of topics but the one of the "ergonomist", "web designers" and "developers" in function of its experience, the type of users targeted by the site/web application and the technical requirements linked to the environment.

According to me , the only remaining justification is the security reason....

My questions are then : What is this security reason? Why is it dangerous to simply closing a window through a script? According to me, the worst is that could be annoying for users but generating a security problem, I do not see how? I would like to understand.

Kind regards.

Hello, Reading several forums and articles, I realized that Firefox is fighting again javascripts allowing to close windows automatically or after clicking on a HTML button or link. A given justification in one of the post of this forum was "Actually due to security reason and user experience aspects you now can't cause the browser to be closed[Completely], only popup windows can be closed or the one parent to a script." and we have always the following sentence coming just after "The user knows anyway how to close his browser". I leave aside the question of user experience aspect; even I cannot accept this justification because according to me, it is not the business of a browser to decide about this kind of topics but the one of the "ergonomist", "web designers" and "developers" in function of its experience, the type of users targeted by the site/web application and the technical requirements linked to the environment. According to me , the only remaining justification is the security reason.... My questions are then : What is this security reason? Why is it dangerous to simply closing a window through a script? According to me, the worst is that could be annoying for users but generating a security problem, I do not see how? I would like to understand. Kind regards.

所有回覆 (3)

more options

JavaScript can be used to close a window that was opened by JavaScript, but not otherwise.

If you think Mozilla is wrong, please submit feedback here - https://input.mozilla.org/en-US/feedback .

more options

I am sorry but that does not answer my question.

What is the threat to leave a javascript to close a Firefox window.

Chrome, IE, Opera, Safari still leave doing it (even sometimes, it is through a browser breach); why not Firefox?

Kind regards.

more options

Auto Shutdown {web link} Executes a command when all downloads are finished. (supports DownThemAll!)