I have a site with heavy load that receives an affiliate param like site.com/?account=account
and pass it as cookies. Then I load that value from the cookies with javascript and show it as a hidden value of the form page that is cached. This seems to be working fine so far.
The problem is that now I'm using cache with public headers for pages including the join form. When retrieving the cookie value with $.cookie("account")
from the javascript file I get a nil value. However If I try calling the cookie from the page itself (even with is public cache headers) it works.
Any idea why this happens and if possible to retrieve the cookie via javascript when page has public headers?