Javascript updates not reflecting on site, please help!


#1

Hi everyone!

I have made some changes to my javascript files and when in testing mode all works as expected, however when I upload the files the javascript changes do not work. I believe this is to do with Cloudflare for two reasons. firstly because I uploaded the exact same files to a different domain that is not under Cloudflare and the javascript changes worked as expected. Secondly, I turned on rocket loader yesterday and it seems too coincidental to not be related.

I have now turned off rocket loader but still the same problem :frowning:

Does anyone have any suggestions and also does anyone have an idea of how long it takes Cloudflare setting changes to reflect on a site?

Really grateful to anyone out there who can help a fellow developer :slight_smile:


#2

They are most likely cached. You can purge the cache and enable development mode when you are working on it (which automatically disables caching for two hours).


#3

Hi, Sandro,

Thanks for the reply, I have purged the cache and placed into dev mode and the javascript works as expected so it is definitely Cloudflare related. When I turn dev mode off the same problem occurs arrrrrggghhhh!

any suggestions, any at all? :slight_smile:


#4

Well, caching is one of the general ideas of Cloudflare, so I wouldnt call it “related” :slight_smile:

If you dont want this, you can disable caching altogether or just for .js files. You’d need a page rule for that.


#5

Bingo! I just noticed there is a purge cache option in the Cloudflare settings (probably what you were referring too), thought you meant the browser :blush:

Refreshed the page and all seems to be working again.

Think I’ll keep rocket loader turned off from now on.

Thanks for the advice!


#6

Rocket Loader shouldn’t cause issues with changes in the files, it needs to be checked as there might be some incompatibility in the actual code. You could try turning it on and seeing, Cache != Rocket Loader.


#7

Hi Matteo,

I think you could be right as I have just made some CSS changes and uploaded - again same problem, changes don’t reflect but work when I purge cache through the cloudflare settings.

Now i’m at a total loss :frowning: . You meantion there may be some imcompatiability in the actual code? Any ideas how I would even begin to find out if this is the case and where to look??

Thanks


#8

Again, caching. Please read about Cloudflare and one of its primary feature before we continue here.


closed #9

This topic was automatically closed after 14 days. New replies are no longer allowed.