Skip to content

FAQ Caching

Carlgo11 edited this page Aug 22, 2023 · 3 revisions

Caching on 2fa.directory

As the 2FA Directory contains a lot of logos, we use edge server caching and client-side caching so that your browser spends less time loading.

What is Edge Server Caching?

Imagine you're at a library, and you frequently read the same popular book. To save time, the librarian decides to keep a copy of that book on a special shelf near you. This way, you don't have to walk to the main bookshelves every time you want to read it.

Similarly, 2FA Directory uses edge server caching to store all images closer to you, our users. These caches are periodically revalidated against the source material to detect changes to the images. We've found that revalidating each image once every month makes for the best user experience. This does however mean that if an image gets updated it might take up to a month before the edge server closest to you notices the change and begins serving the newer version to you.

Caching and cache revalidation is done automatically using Cloudflare's Content Delivery Network (CDN) but we are able to manually force all edge servers to revalidate a particular image if requested.

What is Client Side Caching?

Like with Edge Server Caching, your browser can also store images on your computer so that you don't need to re-download them every time you visit a website. If your browser has this feature turned on, every logo you view on 2FA Directory gets stored in your browser for up to two months. You can force your browser to bypass the client cache by executing a "force-reload" of the page. The exact way to do this differs depending on what browser and operating system you're using.

Clone this wiki locally