Does WP Rocket support fragment caching?

Unfortunately, WP Rocket doesn't support fragment caching.

The partial caching of elements on a page is an entirely different technology than what WP Rocket currently does.

WP Rocket caches a fully rendered page and serves the entire thing as static HTML. In other words, no PHP/MySQL gets processed on that page anymore, once it is served from the cache.

Dynamic content in sections of your pages

If one of your site's features are being generated with PHP any output which is written to your site's pages with PHP will be cached along with everything else on the page, and thus, that output will not update again until the cache is cleared and a new cache file is generated. This issue can happen with shortcodes that display dynamic content.

That's because WP Rocket converts all the PHP and MySQL processes on a given page into static HTML output during the caching process -- most other page caching plugins also do the same thing.

Page caching and dynamic content

For an explanation of how page caching works, you might find our Page Caching Explained in Plain English post useful. 

In short, any dynamic content which needs to update frequently or after each page load must rely 100% on AJAX / JavaScript to be compatible with page caching -- otherwise, it can only be updated when the cache is cleared.

Alternatively, you'd have to exclude any pages which display the dynamic content from the caching altogether:

Exclude Pages from the Cache

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.