Take the 2-minute tour ×

I’m using a specific template on my self-hosted WordPress blog to display a page with randomized posts.

Recently, I configured W3 Total Cache to make use of a content delivery network (CDN). When not logged in as the administrator, a user will have some elements of the site served through the CDN instead of fetching a “live” version from the original server where it is hosted.

I noticed the randomization will not worked if the site is served through the CDN, but works perfectly well is served directly from the original server. More precisely, random posts will be displayed the first time the random post page is invoked. However, if the page is invoked again (or refresh from the browser) the very same posts will be displayed again. Whereas, when working normally, the page will displayed random posts each time it is accessed (or each time the page is refreshed from the browser).

W3 Total Cache has a specific field where the user can input content that must be exclude from the CDN. An example involving such an exclusion can be found here.

The question is simple: how can I exclude my random post template from being served through the CDN? Do I need to input the URL of the random post page or maybe the location of the template that does the randomization?

Thanks a lot,


share|improve this question

closed as off-topic by Pieter Goosen, TheDeadMedic, birgire, Rarst Aug 27 at 12:13



2 Answers 2

up vote 1 down vote accepted

Got the solution. Instead of using the CDN exclusion list, I use the plugin (W3 Total Cache) “Page Cache” option.

Once logged in as the administrator, go to W3 Total Cache settings (a tab called “Performance”). Navigate to “Page Cache” and then to the field named “Never cache the following pages:” Finally enter the name of the page. For example, if the URL of your page is http://my_blog/random all you have to do is add the word random in the field.

It works even with a CDN set up.


share|improve this answer

Take a look @ questions about fragment caching: http://wordpress.stackexchange.com/search?q=%22fragment%20caching%22

Especially: Can I ignore caching of a plugin in W3 Total Cache?

share|improve this answer
Hi, thanks for the suggestion. Since my random posts are displayed on a page, it’s the page I needed to exclude, which can be done easily with W3 Total Cache. I came to the solution by browsing through the thread you pointed to me. –  Parneix Apr 15 '12 at 13:29
