WooCommerce+Varnish .css?v=1.1 -- Iphone (iOS) is stuck with old css version


#1

Preconditions
1 WP 4.9.5 and WooCommerce 3.3.5
2 Varnish enabled with or without, Breeze or W3 Total Cache
Steps to reproduce
1 Make change in css
2 Add a new version to css eg. style.css?v=1.2
Expected result
1 Customers browser reloads the new css version
Actual result
1 On iPhone (iOS), and maybe other devices/phones, the customer is stuck with the old css version until the phone user clears the browser cache .
2 In safari, Firefox and Chrome the browser reloads as expected.

I still facing this issue if varnish is purged.
The only thing that works is to disable varnish on cloudways platform, then everything works as expected.
What am i missing here? Is someone else having this issue?

Please help me out.
Thanks
Johan


#2

Hello,

Varnish acts differently when used on mobile device. This is because of its mechanism. Varnish creates hashes to cache the resource and when it receives subsequent request it tends to match the resource using the same hash. At times it fail to correspond with a valid resource and end up fetching the data from back-end.

Regards,
Ibad