var url = 'http://api.f-mania/logged.php';
var xhr = new XMLHttpRequest();
xhr.open('GET', url + '?acache=' + new Date().getTime());
xhr.withCredentials = true;
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
alert(xhr.responseText);
}
else {
alert('При отправке формы произошла ошибка, детали смотрите в консоли.');
console.log('При отправке формы произошла ошибка, ниже объект с деталями ошибки:');
console.dir(xhr);
}
}
}
xhr.send();