Both CDN caching and browser caching help improve website performance, but they operate at different layers.
CDN caching is controlled through VergeCloud settings and works globally for all users. It stores content on edge servers and benefits both new and returning visitors. Even users in private browsing modes receive fast responses because the CDN does not rely on device storage.
Browser caching, on the other hand, depends on local browser rules and the amount of storage available on the user’s device. It helps with repeat visits but does not improve first time load performance. Storing very large files in the browser cache is also limited.
Sign in to your VergeCloud dashboard and navigate to the Caching Settings page. This is where you manage cache levels, edge behavior, browser caching, and advanced options.
Choose how VergeCloud should cache content:
• Off: No caching, meaning every request is sent to the origin.
• Without QueryString: VergeCloud caches content while ignoring query parameters. This is ideal for static files where query strings do not affect the output.
• With QueryString: VergeCloud stores different versions of a resource based on query parameters. This is useful when query strings determine the content returned.
If you make updates to your website, you may need to purge cache:
• Purge Individual Files: Clears the cache for a specific file such as an updated image or script.
• Purge Everything: Clears all cached content at every edge location. Use this only when absolutely necessary, as it can temporarily increase load on your origin.
1. Cache Max Age lets you specify how long content should remain in cache before the CDN checks with your origin again.
2. Cache Error Pages allows VergeCloud to temporarily cache non successful responses, reducing pressure on your origin during outages or traffic surges.
3. Maximum Cache Size defines the largest file size the CDN is allowed to store, which is helpful for large media files.
4. Browser Cache Duration controls how long a user’s browser stores assets, improving load times on repeat visits.
5. Caching files that include Set Cookie headers is possible in specific cases where the content is static and cookies are meant only for analytics. Use this carefully to avoid exposing personalized data.
6. Development Mode ensures that all requests bypass the cache so you can see changes in real time.
7. Always Online keeps your website accessible by serving cached versions if your origin becomes unreachable.
If no custom rules are set, VergeCloud automatically caches commonly used static file types including images, video, audio, JavaScript, CSS, documents, archives, fonts, and several standard binary formats.
HTML documents are not cached by default because they often contain dynamic or personalized content. If your pages are static or change infrequently, you can enable HTML caching using a Page Rule.
Examples:
• To cache the entire site: yourdomain.com/*
• To cache a single page: yourdomain.com/about us
Make sure your Page Rules are ordered correctly to avoid conflicts.
VergeCloud provides a dedicated set of Caching APIs. These endpoints allow you to retrieve current cache configurations, update caching behavior, and purge cached content whenever needed.
Explore all caching-related endpoints here: https://api.vergecloud.com/docs#tag/caching
After configuring your caching settings, verify that they are working correctly:
1. Use your browser’s developer tools to inspect the x-cache response header. A hit indicates that content is served from the cache.
2. You can also use tools like curl or dig to check the cache status.
For example, run the following curl command to check a resource's cache status:
By leveraging VergeCloud’s caching solutions, your website can achieve faster load times, reduced server load, and a smoother user experience worldwide. And if you encounter any issues or need assistance with your caching setup, VergeCloud provides reliable 24/7 cloud support to ensure your site stays fast, available, and optimized at all times.