Javascript cache problem
3 posters
Page 1 of 1
Javascript cache problem
Forum:http://tifosigialloverdi.forumattivo.com/(not mine)
Issue:Upon saving modifications on a js code(in the js codes management), the code does not update on the forum. Basically it runs the old version, even though I tried saving the new code 3 times, deleting it and recreating it, turning the js codes management on and off and cleaning the browser cache.
The JS code(irrelevant i think):
I'm sure the code is syntactically correct.
Also, I noticed turning the JS codes management off has no effect on this very code, while turning it on does not load the other codes on that forum. What is going on?
Issue:Upon saving modifications on a js code(in the js codes management), the code does not update on the forum. Basically it runs the old version, even though I tried saving the new code 3 times, deleting it and recreating it, turning the js codes management on and off and cleaning the browser cache.
The JS code(irrelevant i think):
- Code:
function parse(resp, i, loader){
var parser=new DOMParser();
var doc=parser.parseFromString(resp, "text/html");
var html=doc.querySelectorAll(".post-entry>div:nth-child(2)");
html=html[0].innerHTML;
render(html, i, loader);
}
function render(html, i, loader){
loader[i].className="last_mess";
loader[i].innerHTML=html;
}
document.addEventListener("DOMContentLoaded", function(){
var con=document.querySelectorAll(".ipbtable>tbody>tr>.row1>span>a:not(.last-post-icon)"), len=con.length;
for(var j=0;j<len;j++){
var load=document.createElement("div");
load.className="loader";
con[j].parentElement.parentElement.appendChild(load);
}
var loader=document.querySelectorAll(".loader");
(function get(i){
var href=con[i].getAttribute("href");
fetch(href+"?view=newest").then(function(response){
return response.text();
}).then(function(html){
parse(html, i, loader);
if(i<len-1) get(++i);
});
}(0))
})
I'm sure the code is syntactically correct.
Also, I noticed turning the JS codes management off has no effect on this very code, while turning it on does not load the other codes on that forum. What is going on?
Last edited by Justice™ on September 22nd 2018, 4:59 pm; edited 1 time in total
Guest- Guest
Re: Javascript cache problem
Clear your browser's cache and history.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Javascript cache problem
As I already said, I did already clear the cache. I also cleared the cookies and localstorage. The history cannot be accessed by the forum, so it has no effect on the code.
Edit:I tried accessing the forum from my phone and the same thing happens.
Edit:I tried accessing the forum from my phone and the same thing happens.
Guest- Guest
Re: Javascript cache problem
I mean your browser (Firefox, Chrome, etc.)
The topic was posted in the wrong section, so I have moved it to the correct section.
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Javascript cache problem
I know what you mean. The forum simply cannot access the browser history. Anyway, I tried opening the forum in an incognito tab(no cookies no cache, no history) and the same thing happened. I use firefox 64 as a browser. I also tested on the latest version of chrome and the same thing happens.
Guest- Guest
Re: Javascript cache problem
Hello,
I have just ran a test on my forum and I have no problem saving any JavaScripts not even this one I then made a change to the code and it still saved with NO problems
I have just ran a test on my forum and I have no problem saving any JavaScripts not even this one I then made a change to the code and it still saved with NO problems
Re: Javascript cache problem
Does this only happen on Chrome?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Javascript cache problem
@SLGray, I tried on firefox, chrome and chrome mobile. If you want I can send you a pm with the admin credentials so you can check yourself.
@SarkZKalie, you mean you tried the code on your forum and it saves correctly? Or do you mean it works on my forum?
@SarkZKalie, you mean you tried the code on your forum and it saves correctly? Or do you mean it works on my forum?
Guest- Guest
Re: Javascript cache problem
Hello,
Have you tried to erase the javascript page, and then create another javascript with the updated code? That might solve the issue.
Best regards.
Have you tried to erase the javascript page, and then create another javascript with the updated code? That might solve the issue.
Best regards.
Guest- Guest
Re: Javascript cache problem
I did that already and the code still doesn't update on the forum. It still shows the old one no matter what I do. Even if I disable the js codes management, the code is still there. I dont understand what's going on.mpelmmc wrote:Hello,
Have you tried to erase the javascript page, and then create another javascript with the updated code? That might solve the issue.
Best regards.
Guest- Guest
Re: Javascript cache problem
ok send me a PM with the following
Admin test account:
Password:
URL of your forum:
The code you want to be put on the forum:
Name of the code on the JS you want replaced:
Admin test account:
Password:
URL of your forum:
The code you want to be put on the forum:
Name of the code on the JS you want replaced:
Re: Javascript cache problem
The code seems to have updated itself now after not touching anything for 3 hours. I can edit it and it saves. I'll mark this topic as solved. Thanks for the help!
Guest- Guest
Re: Javascript cache problem
Just thought your forum may have been busy on our servers and they have been running a little slow at times thanks to the work done the other day.
So if you have a problem like this again Try and do a resynchronize of your forum
This tells our servers to get back in the gear LOL and a kick up the server (BUTT)
So if you have a problem like this again Try and do a resynchronize of your forum
This tells our servers to get back in the gear LOL and a kick up the server (BUTT)
Re: Javascript cache problem
Problem solved & topic archived.
|
Similar topics
» JAVASCRIPT PROBLEM
» JavaScript problem!
» Christmas Javascript Problem
» Javascript activation problem
» Words problem in Javascript
» JavaScript problem!
» Christmas Javascript Problem
» Javascript activation problem
» Words problem in Javascript
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum