Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

Is there a possibility to prevent "This page is asking you to confirm that you want to leave..." popup message using JavaScript?

more options

HI! Could you tell me please how can I prevent this popup message? Is there some browser vendor supported way to do it using JavaScript or we have just only possibility to do it by editing Firefox browser setting 'dom.disable_beforeunload = true' on each browser client? As an app developer I need to disable this notification popup for all users at once. Thanks!

HI! Could you tell me please how can I prevent this popup message? Is there some browser vendor supported way to do it using JavaScript or we have just only possibility to do it by editing Firefox browser setting 'dom.disable_beforeunload = true' on each browser client? As an app developer I need to disable this notification popup for all users at once. Thanks!

Krejt Përgjigjet (2)

more options

It is the web page doing this, so if you have control over the web page then modify its content. You can use a autoconfig.cfg file to force the pref to false for all users if this is about Firefox in a company environment.

I don't know if you can overtake the onbeforeunload handler via JavaScript (WebExtension) and replace it with an empty NOP function.

Try to ask advice at the Stack Overflow or Reddit forum website.

more options

aleksandr.chebaev said

As an app developer I need to disable this notification popup for all users at once.

I'm puzzled by that statement. If you are the web app developer, and you don't want to hook the beforeunload event, and you don't know why it is happening, that's concerning. Are you using frameworks or libraries that might not want a user to leave the page to avoid loss of unsaved data while editing or progressing through a transaction? It's got to be somewhere.