Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Dynamic CSS > Caching Considerations

9.8. Caching Considerations

When serving any kind of dynamic file, caching can become an issue. If you are providing files that are preprocessed, but otherwise static and served to many users, you just need to configure your web server to consider these files cachable (and you can still use versioning—described in the previous chapter—to effectively bypass the cache when necessary). If these files are processed at any point in reaction to the user, rather than before the fact, these files can also be cached via different mechanisms. However, it is better for your users that you proactively prepare any files like this before they are requested. This means that no single individual bears the brunt of the performance implications, and the servers undergo predictable (rather than inconsistent) stress.

Where files are modified on the fly (perhaps on a per-user basis), and too many potential variations exist for it to be reasonable to create these files in advance, caching becomes impractical from the server side (although the browser can still cache the content), so performance hits are unavoidable. To combat this, you can try to limit the potential variations, cache the variations that get the most traffic, or ensure that your web server has no problem with the extra load. In that situation, Edge Side Caching can help minimize the burden. Edge Side Caching is currently only usable within (X)HTML markup, but we mention it here for your interest and because it may be relevant to your chosen caching strategy.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint