Cache Everything Breaks Mobile Site

After installing Cloudflare with Cache Level: “Cache Everything” I noticed that the mobile version of my website (created with Wordpress Mobile Pack Pro) was not working anymore. Therefore I was forced to change the Cache Level to “Standard”.

The only problem with using Cache Level Standard is that the response times have dramatically increased from 200ms to 2,000 ms. Also the level of caching has decreased to approx. 25%.

How can I recover the fast response times and improve caching without breaking the mobile version of our website?

1 Like

Cache Everything is going to server the same content to everybody.

On the flip side, if the first visitor to populate your cache is a mobile user, your cache would probably show the mobile site to everybody.

Cloudflare does have a Mobile Redirect option on the Speed tab. Off the top of my head, I can’t think of a way to have Wordpress respond as a second domain that would be mobile friendly.

To serve different content for the same URI requires using a custom cache key which is one of the few Enterprise Only features (for ENT, by device type is a standard custom cache key available in page rules). For a non-ENT plan as @sdayman notes, using a separate mobile link is probably the best way to achieve this.

How is it a different site is being served based on device, but same URI?

I also have this problem on a WordPress site.
My mobile site code runs at the origin server, serving a mobile and desktop version depending on the request.
I can live with Standard caching for desktop, but I really need Cache Everything for mobile.
I have reached out to Cloudflare regarding Enterprise pricing and it is out of the question.

Is it possible to setup Mobile Redirect to and Cache Everything for that URL only and have standard on
Bearing in mind this is WordPress the site domain would still be for those pages, but as the Mobile Rediect happens at the Edge I though this may be a feasible solution.

Would it need 301 redirects to make sure the pages did not effect SEO?
Can anyone see any issues for loops, SEO or social sharing etc?

I don’t think that mobile redirect is a solution for this problem. Mobile redirect happens at the edge, but it sends users to a different URL. Your desktop and mobile versions have the same URL, and Wordpress is going to enforce that. That’s also an issue for SEO because you want the same URL.

Cache Everything also gets tricky with WordPress. Generally the page code is pretty quick. Especially if the pages are cached on your server. Hopefully that mobile site code supports page caching.

You’re better off pursuing AMP. There’s a plugin for that.

1 Like

Unfortunately we have built post swiping functionality into the mobile theme.

Same Problem…btw i create 2 page rules for this problem and its working fine for me… Do not use root domain, like yoursite com or www.yoursite com. find exact url for your desktop and mobile version like this : and i don’t know this is perfect solution or not . :slight_smile: