AJAX - when the user leaves the page - good or bad practice / implementation?

I just read how to check that users leave the page earlier, when suddenly I thought about doing AJAX, when the user leaves the page to send analytical data back to the server.

Does the AJAX event do onunloadgood or bad practice / implementation?

+2
source share
3 answers

Making AJAX calls while unloading doesn't work very well in all situations. Typically, the web browser closes the panel almost immediately, and the AJAX call may be lost.

, advance . , 5 , 10 , 20 .. , . , , , : -)

+4

- , , ajax - , , , .

, , onunload, , .

+1

,

, , AJAX, , ( )

, , ! , , : P

.

0

Source: https://habr.com/ru/post/1723767/


All Articles