Caching different version mobile/desktop
I've finally gotten Cloudflare to cache my website using service workers (I'll switch to ES format in the future when it's up and running), and it caches properly. My website has a different theme for mobile and desktop viewers (completely different). When my site detects a mobile UA, it sends a cookie, which tells my website to use the mobile theme.
When I view pages that are cached, however, Cloudflare shows the web version instead of caching and showing a mobile version; the cookie is still sent. I know enterprise users can do this with cache keys, but is there any way to force CF to cache and deliver a different version by mobile/deskop? Perhaps by detecting the cookie or otherwise?
0 Replies