- Issue created by @mike-kelly
- 🇵🇱Poland shumer Wroclaw
Thanks for the update. I was in middle of my local setup to check that :)
Closing the issue then.
Blocks on the home page of my site use Mobile Detect module to present content to users which is dependent on the device used to view site. This functionality doesn't work when Advanced Varnish is enabled.
For the mobile-aware blocks on the front page I checked ESI block and chose 'no-cache'. This had no effect once the page had been loaded once. The same cached version was always loaded subsequently, whether in mobile or desktop view.
I tried adding the home page to the 'Excluded URLs' list. This disables Varnish for the whole site. Can I specify the page somehow? I tried adding /node/x for the node which is used as the home page, and also using its alias.
I also tried turning off cache for the content type used for the front page, using Adv Varnish settings in content type.
Enable Advanced Varnish and Mobile Detect modules.
Add two blocks to site home page, use Mobile Detect block configuration options to set one which shows only on phones, and one which shows only on desktop computers.
Check the ESI block, 'nocache' option for both blocks.
Enable ESI in Advanced Varnish configuration page.
Load front page in browser. The device used to load the page determines cached version of page for all devices thereafter.
Ideally the fix should be at the level of blocks, which are set not to be cached.
Active
4.0
Code
Thanks for the update. I was in middle of my local setup to check that :)
Closing the issue then.