Cache Everything Breaks Mobile Site


#1

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?


#2

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.


#3

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.


#4

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


#5

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 m.mywebsite.com and Cache Everything for that URL only and have standard on www.mywebsite.com.
Bearing in mind this is WordPress the site domain would still be www.mywebsite.com 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 m.mywebsite.com pages did not effect SEO?
Can anyone see any issues for loops, SEO or social sharing etc?


#6

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.


#7

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


#8

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