The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Javascript cache problem

3 posters

Go down

Solved Javascript cache problem

Post by Guest September 21st 2018, 11:53 pm

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):
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))
})
And here you can see the js code the forum loads:http://tifosigialloverdi.forumattivo.com/38726.js
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
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by SLGray September 21st 2018, 11:55 pm

Clear your browser's cache and history.


Javascript cache problem Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51498
Reputation : 3523
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Javascript cache problem

Post by Guest September 21st 2018, 11:57 pm

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by SLGray September 22nd 2018, 12:05 am

I mean your browser (Firefox, Chrome, etc.)
The topic was posted in the wrong section, so I have moved it to the correct section.
Please read our forum rules:  ESF General Rules


Javascript cache problem Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51498
Reputation : 3523
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Javascript cache problem

Post by Guest September 22nd 2018, 12:29 am

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by Ape September 22nd 2018, 3:28 am

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


Javascript cache problem Left1212Javascript cache problem Center11Javascript cache problem Right112
Javascript cache problem Ape_b110
Javascript cache problem Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19325
Reputation : 2005
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Javascript cache problem

Post by SLGray September 22nd 2018, 8:38 am

Does this only happen on Chrome?


Javascript cache problem Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51498
Reputation : 3523
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Javascript cache problem

Post by SarkZKalie September 22nd 2018, 9:10 am

There's nothing wrong on my end


Javascript cache problem Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1442
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Javascript cache problem

Post by Guest September 22nd 2018, 9:25 am

@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?
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by Guest September 22nd 2018, 9:40 am

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by Guest September 22nd 2018, 11:21 am

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.
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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by Ape September 22nd 2018, 2:32 pm

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:


Javascript cache problem Left1212Javascript cache problem Center11Javascript cache problem Right112
Javascript cache problem Ape_b110
Javascript cache problem Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19325
Reputation : 2005
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Javascript cache problem

Post by Guest September 22nd 2018, 4:59 pm

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!
avatar
Guest
Guest


Back to top Go down

Solved Re: Javascript cache problem

Post by Ape September 22nd 2018, 5:10 pm

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)


Javascript cache problem Left1212Javascript cache problem Center11Javascript cache problem Right112
Javascript cache problem Ape_b110
Javascript cache problem Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19325
Reputation : 2005
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Javascript cache problem

Post by Ape September 22nd 2018, 5:10 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


Javascript cache problem Left1212Javascript cache problem Center11Javascript cache problem Right112
Javascript cache problem Ape_b110
Javascript cache problem Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19325
Reputation : 2005
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum