• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Cloudflare Caching

Status
Not open for further replies.
May I ask what the current cache settings in cloudflare is? Many users have reported slow loading times, mainly due to having to download many images on various pages (resource tabs, map threads, media gallery and more).

I have noticed that the Browser Cache TTL is extremely frequent (many times per day). I have to download the same images over and over again.

I feel like an extended Browser Cache TTL (1 week+) would be beneficial to all the users of Hive. That way people will only have to download the images once per week, instead of multiple times per day.

@Ralle
 
Huh. Can you refer to some URLs I can check out to see what you're seeing?
It's not necessarily a specific URL, it's only when I enter a page with many images I have to download them to my local cache. Cloudflare's cache settings tells clients how long they should keep the files in their cache, and now it seems like the cache settings are telling clients to delete the local cached files every 2-3 hours or so.

Also. CloudFlare will come with Hive 2 - Remoosed edition.
But, the nameservers are already behind Cloudflare no?


EDIT: Screenshot
 
Are you sure you don't have some cache setting that clears the cache on relaunch or something?
Yes I'm sure. There are no expire headers. Cloudflare can easily do this automatically for you if you just enable it. Enterprise isn't required to do that. I have hosted many websites in my time, and never had a problem with file size limitations or caching on the free version of Cloudflare.

The website would also benefit greatly from actually utilizing the content delivery network of Cloudflare so people in different countries/continents can get content served from a local or nearby server. As it is now, only the DNS is hosted by Cloudflare (I am guessing the reason for this is because the domain name and web server is handled by two different companies?).

For a website with so many images and content with high file sizes you should definitely take the steps I suggested. It will be beneficial to all users of the site.

EDIT: To avoid any confusion I have also compared Hive to another locally stored website, so you can see that the cache for Hive is cleared when I exit the browsing session (this is not configurable on my end, this is due to the lack of expiry headers).

Hive - Screenshot

Another website - Screenshot

As you can see they instruct their clients to store a local cache for 1 month.
 
Last edited:

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
You don't understand. What I mean is this:
upload_2020-3-21_20-30-35.png


The next version of the site has a special URL used for uploading to the site. Many people have maps bigger than 100 MB.
 
You don't understand. What I mean is this:
View attachment 350036

The next version of the site has a special URL used for uploading to the site. Many people have maps bigger than 100 MB.
Well yeah, but you can choose what parts of the site to proxy/un-proxy, so if you make the download section an un-proxied sub domain you will easily circumvent this issue. I am guessing that's what you're gonna do with the next site, but since the new site probably won't be released for some time you should consider doing it with the current site. The loading times is a real pain, and images keeps timing out (resulting in a broken image icon).

Of course, having an un-proxied sub domain will leave you vulnerable to attacks, but anyone with some know-how and malicous intent will be able to find the bare IP to the site anyway.

EDIT: If you don't want an un-proxied sub domain you can still manually add expiry headers without Cloudflare.
 
Last edited:
Exactly.

As I said. I see expiry headers on those images expiring in 2037.
Hmm then I don't think the expiry headers are working properly.

A good way to determine if they are in fact working as they should is to go to a page with lots of images, wait until they all load and then close down the browser. Then you go back to the same page and see if you have to load them again.

Can you try with this link? https://www.hiveworkshop.com/attachments/wip-gif.349874/

Just open the GIF, let it load fully and then exit the browser and re-open the same GIF like I explained above.
 
So this has nothing to do with internet browser cache deletion?
Yes it does, but maybe not in the sense you imagine.

A website instructs the users how long an image should be locally saved on their computers. After that time the images are automatically deleted from the users cache. This results in the user having to re-download the same image again.

A user can manually delete/clear his/her cache by doing it in the browser settings, or with tools such as Ccleaner.

An expiry header is something in the website that tells the users how long the images should be saved in the cache. The pros of doing this is that the user only have to download the same files once throughout the whole expiry duration, resulting in faster load times on pages the user have visited before.

The cons of doing it is if images have changed by the website administrators, the user will still see the old images unless he force refreshes the page, or clears his cache manually.

A good expiry time is around 1 week, or if the website doesn't change much (no new images or content), then 1 month or more is totally fine.
 

pyf

pyf

Level 32
Joined
Mar 21, 2016
Messages
2,985
Yes it does, but maybe not in the sense you imagine.

A website instructs the users how long an image should be locally saved on their computers. After that time the images are automatically deleted from the users cache. This results in the user having to re-download the same image again.

A user can manually delete/clear his/her cache by doing it in the browser settings, or with tools such as Ccleaner.

An expiry header is something in the website that tells the users how long the images should be saved in the cache. The pros of doing this is that the user only have to download the same files once throughout the whole expiry duration, resulting in faster load times on pages the user have visited before.

The cons of doing it is if images have changed by the website administrators, the user will still see the old images unless he force refreshes the page, or clears his cache manually.

A good expiry time is around 1 week, or if the website doesn't change much (no new images or content), then 1 month or more is totally fine.
Maybe it is worth mentioning that one's browser cache settings can make a *big* difference, depending on one's available RAM.

For a practical example, here are the important cache settings that Pale Moon Commander allows to tweak easily, for the users of the Pale Moon web browser:

pale moon commander - cache.jpg

Users are therefore encouraged to tweak their browser settings accordingly.


Other browser extensions such as Greedy Cache (or any similar extension), can also help make a notable difference.

[...] The website would also benefit greatly from actually utilizing the content delivery network of Cloudflare so people in different countries/continents can get content served from a local or nearby server. As it is now, only the DNS is hosted by Cloudflare (I am guessing the reason for this is because the domain name and web server is handled by two different companies?). [...]

Users are encouraged to give Decentraleyes a try. I am pointing out there also exists a fork of it called LocalCDN, but this other project does not support the web browser I am personally using on a daily basis.
 
Status
Not open for further replies.
Top