Thank you.
I disabled server-side page caching on my site for this reason. If the markup you serve can depend on client side parameters, then it should not be cached.
The exception would be if you can control the way cache files are identified on the server and include a hash of the client side parameters that influence the output. Then users with save-data on would receive their own cached response.
I had thought that would be the case! Thank you for confirming.
Some WP-specific hosts have Redis or a similar PHP cache implemented so it is a consideration.
Still, VERY interesting tidbit to keep in my back pocket! Thank you for sharing!
If those hosts are using Redis to cache transients or DB queries there should be no problem. Only if rendered HTML is cached and sent to all users might it be an issue.
I had briefly considered forking or modifying the cache plugin I use to keep separate cache files depending on this setting, but didn't end up doing that. For cache plugin authors it wouldn't be too difficult though.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you.
I disabled server-side page caching on my site for this reason. If the markup you serve can depend on client side parameters, then it should not be cached.
The exception would be if you can control the way cache files are identified on the server and include a hash of the client side parameters that influence the output. Then users with save-data on would receive their own cached response.
I had thought that would be the case! Thank you for confirming.
Some WP-specific hosts have Redis or a similar PHP cache implemented so it is a consideration.
Still, VERY interesting tidbit to keep in my back pocket! Thank you for sharing!
If those hosts are using Redis to cache transients or DB queries there should be no problem. Only if rendered HTML is cached and sent to all users might it be an issue.
I had briefly considered forking or modifying the cache plugin I use to keep separate cache files depending on this setting, but didn't end up doing that. For cache plugin authors it wouldn't be too difficult though.