Az oldal korlátolt funkcionalitással fog rendelkezni, amíg elvégezzük a felhasználói élményt javító karbantartást. Ha egy leírás nem oldja meg a problémáját, és kérdést tenne fel, akkor a támogatási közösségünk a @FirefoxSupport Twitter oldalon tud segíteni, vagy az /r/firefox oldalon a Redditen.

Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

További tudnivalók

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

What is the expected navigation behavior of a 204 response to a form post.

  • 1 válasz
  • 0 embernek van ilyen problémája
  • 1 megtekintés
  • Utolsó üzenet ettől: grimzecho

more options

According to Mozilla, the 204 No Content response "indicates that a request has succeeded but that the client doesn't need to navigate away from its current page".

However, when Firefox receives such a code in response to a status code, it triggers the `window.onbeforeunload` event and any associated handlers. This has side-effects such as closing any open websocket connections associated with the page, re-rendering the DOM (which fires various lifecycle methods in single page apps), and other similar activities that are generally associated with navigating away from a page.

Is this behavior intended or documented anywhere? Or should it be considered a bug?

According to Mozilla, the [https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204 204 No Content] response "indicates that a request has succeeded but that the client doesn't need to navigate away from its current page". However, when Firefox receives such a code in response to a status code, it triggers the `window.onbeforeunload` event and any associated handlers. This has side-effects such as closing any open websocket connections associated with the page, re-rendering the DOM (which fires various lifecycle methods in single page apps), and other similar activities that are generally associated with navigating away from a page. Is this behavior intended or documented anywhere? Or should it be considered a bug?

Összes válasz (1)

more options

--edit-- There is a typo. The first sentence of the second paragraph should read: "However, when Firefox receives such a code in response to a form post, it triggers ..."