var data = new FormData(); data.append('csrfmiddlewaretoken', '{{csrf_token}}'); navigator.sendBeacon('endpoint/',data)