Unable to get w3 total cache page caching to work with my cookies

418 Views Asked by At

I have dynamic phone numbers in various parts of my website (header/footer/inner pages) that pull the correct phone number through a stored cookie.

The cookies are stored by a query string that contains a unique ID (ex. wwww.mydomain.com/a/1300) which stores a unique phone number.

My problem is when I enable page caching, the functionality breaks and it does not show the right phone number.

Enabling fragment caching makes it work to a certain extent:

  1. the phone numbers show, but only when I refresh the page and not when I navigate through the website
  2. The cookie is not always been stored/replaced when loading a different unique ID.

Any help with this would be greatly appreciated, it has me stumped.

0

There are 0 best solutions below