> For the complete documentation index, see [llms.txt](https://docs.link11.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.link11.com/product-guides/secure-cdn/faq/static-vs-full-page-caching.md).

# Static vs Full Page Caching

When setting up a content delivery network (CDN) for your website, you have the option to cache the full website or use a specific "static" subdomain for caching static content. Each approach has its own pros and cons, which we'll explore in this documentation to help you make an informed decision.

## **Caching Full Website**

### **Pros**:

* **Simplified setup**: Caching the full website allows for a straightforward configuration as all assets, including HTML pages, images, scripts, and stylesheets, are cached by the CDN.
* **Seamless caching**: Any changes made to the website, including updates to dynamic content, will be automatically reflected in the cached version as the CDN handles the caching process holistically.
* **Enhanced performance**: Caching the full website ensures that all resources are readily available at edge locations, reducing the overall latency and improving page load times for users across the globe.

### **Cons**:

* **Increased latency**: All requests are routed via the caching servers regardless of whether they are requesting content that should be found in the cache or not.
* **Potential caching of dynamic content**: Caching dynamic content can lead to outdated information being served to users, especially if the website relies heavily on real-time or personalized data.

## **Specific "Static" Subdomain**

### **Pros**:

* **Targeted caching**: By using a specific "static" subdomain, you can selectively cache only static assets such as images, stylesheets, and scripts, while leaving dynamic content untouched.
* **Improved cache efficiency**: Focusing caching efforts on static resources ensures that frequently accessed files are readily available at the edge locations, reducing the load on the origin server and improving overall performance.
* **Flexibility in cache control**: Caching static assets separately provides more control over cache settings and expiration times specific to those resources.

### **Cons**:

* **Complex configuration**: Setting up a specific subdomain for caching static content might involve additional configuration steps to ensure the proper routing and handling of requests for static files.
* **Increased maintenance overhead**: As the website evolves and new static assets are added, you need to ensure that they are correctly assigned to the "static" subdomain for optimal caching.

## Conclusion

The decision between caching the full website or using a specific "static" subdomain depends on the specific needs of your website and its content dynamics. If your website has a substantial amount of dynamic content that requires real-time updates, focusing on caching the static assets through a dedicated subdomain might be more suitable. However, if your website predominantly consists of static content or you prefer a simpler setup, caching the full website provides a more straightforward approach.

Evaluate the nature of your website, consider the frequency of content updates, and weigh the trade-offs between caching efficiency and dynamic content freshness to determine the best approach for your CDN caching strategy.

If you have any further questions or need assistance with CDN configuration, feel free to reach out to our support team. We're here to help!
