Black Friday Sale!

WordPress Super Cache and Dynamic content

By default, WordPress Super Cache neutralizes the ability to serve dynamic content. Some simple settings will allow you to use both.
WordPress Super Cache and dynamic content - blog post featured image

WordPress Super Cache is a popular free caching plugin for WordPress users. Like most WordPress caching plugins, it is used to improve load times and enhance the overall user experience by presenting your web content more quickly. By default, WordPress Super Cache neutralizes the ability to serve dynamic content, some simple settings will allow you to do so.

WordPress Super Cache – page caching

One way that WordPress super cache works is through a concept called page caching.

The plugin generates a cached file when a page is requested for the first time, stores it for a pre-defined duration, and then provides it to the next visitor that requests for the page. Serving the cached version instead of fully rendering it all over again cuts down on how long it takes to load a website.

While it is easy to see why this is such a helpful tool, it is important to understand that using page caching eliminates the ability to use dynamic content and cookies. Dynamic content, which is designed to provide a more custom user website experience based on certain inputs, means that a web page might not look the same way for every user. Consequently, when the WordPress super cache serves the cached version, it might not match the version that should have been presented to the user.

The solution, using both page caching and dynamic content

Fortunately, WordPress SuperCache makes it easy for you to benefit from both page caching and dynamic content. The approach is easy, all you have to do is to turn off page caching for the web pages with dynamic content and cookies. This way, you can keep using WordPress super cache to provide a quality user experience, that is also custom at the same time.

How to exclude pages from the cache while using WordPress Super Cache

  1. On your WordPress dashboard, go to Settings → WordPress Super Cache → Advanced (tab).
  2. a. Find the “Accepted Filenames & Rejected URIs” section.
    b. Select the relevant pages .
  3. Click “Save settings”

How to disable caching for visitors who have a cookie set in their browser

  1. On your WordPress dashboard, go to Settings → WordPress Super Cache → Advanced (tab).
  2. a. Find the “Miscellaneous” section.
    b. Select “Disable caching for visitors who have a cookie set in their browser”.
  3. Click “Save settings”
  • Was this Helpful ?
  • YesNo
Related Articles