Version EE 2.2.2
I have a problem with reading a cookie on the homepage of my EE2 site.
This issue appears to be limited to IE7 (and poss IE6 - haven’t checked yet). IE8+, and all ‘proper’ browsers are not affected by this problem.
As a user navigates around my site there is a custom cookie used to render some personal information for the user. The cookie name is like this: “myBrand_session” with myBrand repaced by the site name.
The page loads an EE template, and then on ‘doc ready’ a script (JS) checks for the existence of the cookie and renders some additional data into the template. The jQuery cookie plugin is being used to check for the existence of cookies and to set/delete them as appropriate.
In IE7, on every page of my site except the homepage, this cookie is present and is read perfectly - the page behaves as expected. On the site homepage however the cookie is not being read. If I look at the document the cookie is not even present in the page.
I’ve taken everything out of my homepage template - it’s an empy <html><head></head><body></body></html> shell with only the calls to the relevant scripts. The issue persists.
If I copy the stripped back homepage code to another template in the same template group it works properly and the user’s session cookie is detected and read etc.
If I edit the template group so that the /index/ template is no longer the site’s homepage and then hit the /index/ template the cookie is detected and the page works.
The issue is present when template caching is on for this particular template, and when template caching is switched off.
This leads me to assume that EE is doing something differently with my template when it is the ‘homepage’ of the site - and this is somehow messing up the document’s cookies in IE7.
Can anyone help? This has serious ramifications for my site. I need to run a load test using a specific piece of software than unfortunately requires IE7 to run. At the moment this IE7/cookie/homepage issue is preventing me from running the load tests I need to run.
Looking forward to any help or advice that can be given,
thanks
Charlie