Я установил поддомен в своей зоне хоста для портфолио для музыки.
Моя страница продолжает обновляться через минуту или около того. Это очень неудобно, потому что это музыкальная страница, и вы не можете прослушать всю песню, пока она не обновится и не начнется снова.
Я заметил, что есть автоматические файлы, которые мы создали.
один из них - файл javascript, и я не слишком хорош в Javascript
Файл выглядит так:
function SqueereHTTP(url, instance) {
this.loaded = false;
this.url=url;
this.script;
this.firstparam=true;
this.serverResponse;
this.instance=instance;
that=this;
this.AddParam = function(p, v) {
if (that.firstparam) {
that.url+='?'+p+'='+v;
that.firstparam=false;
} else {
that.url+='&'+p+'='+v;
}
}
this.Request = function(force) {
that.AddParam('instance', that.instance);
if (force) {
var axd = new Date();
var shake = axd.getDate()+""+axd.getMonth()+1+""+axd.getFullYear()+""+axd.getHours()+""+axd.getMinutes()+""+axd.getSeconds();
that.AddParam('squeereshaker', shake);
}
that.script = document.createElement('script');
that.script.setAttribute('charset','UTF-8');
that.script.setAttribute('type','text/javascript');
that.script.setAttribute('src', that.url);
that.script.onload = that.onLoad;
that.script.onreadystatechange = that.onLoad;
document.getElementsByTagName('head')[0].appendChild(that.script);
}
this.onComplete = function(serverResponse) { }
this.onLoad = function() {
if (that.loaded) { return; }
that.loaded=true;
};
return this;
}
Есть ли способ остановить цикл освежения?
Спасибо