I am sending data to my server when the user clicks on a certain button. But I am not expecting any response from the server because I don’t want any data back from the server and I don’t want to inform the user if the data sent by his click was succesfully received by the server.
I am currently using this callback function to send the data without using any then() function after the fetch() function :
fetch(url, { method: ‘POST’, body: ‘…’ });
Should I still use then() function afterwards even if I am not expecting any response from the server and I don’t want to inform the user on the status of the request ?
If something goes wrong with the fetch() function or with the HTTP request (created by fetch() ) can it freeze or slow down the web page on the user’s end if I am not using then(), or simply nothing will happen ?
Thank you very much !
Recent Comments