// the server returns appropriate CORS headers so cross-domain AJAX requests work:
var xhr = new XMLHttpRequest();
xhr.open('GET', '{{ ping_url }}', true);
xhr.send(null);