On multilingual site, varnish caching is enabled. When any user call www.example.com, page gets cached to the first visitor's language preferences. All subsequent visitors get pages in that first visitor's language rather than their own. For Example : first visitor browse www.example.com then language selection page apears and visitor select language and entered to the website. (www.example.com/fr) Then second visitor browse same url www.example.com then visitor redirected to www.example.com/fr instead of language selection page.
Some details :
We are using cookie to determine the language which gets set when user select language preference. If we exclude homepage from cache it works fine but we don't want to exclude this page as this is the homepage of website.
Question : How we can set varnish or Drupal to read cookie from browser and display language selection page ? OR Varnish should detect language cookie and if not set then display language selection page ?
Thanks in advance.