Cannot reproduce Cookies "xf___crossTab" and "xf_visitorCounts" are set without custom cookie prefix

nocte

Well-known member
Affected version
XF 2.1 & 2.2
It seems that (at least in XF 2.1) the cookies named xf___crossTab and xf_visitorCounts are even set, if a custom cookie prefix is set in config.php. The corresponding cookies named c_prefix___crossTab and c_prefix_visitorCounts are set as well.

The origin seems to be a JS file (js/xf/core-compiled.js).

P.S. seems to be still present in XF 2.2
 
Last edited:
First of all it's important to note that these aren't cookies, they are local storage keys. Not a huge amount of material difference (except the values cannot be transmitted to the server like cookies).

Despite that it is intended that they make use of the cookie prefix (to avoid collisions with other installations).

However, if I clean this data on my local dev installation and reload the page, only the storage items with the correct prefix are added:

1642765232417.webp

Though of course if I access another installation on the same browser, I will see the local storage keys for both installations:

1642765329650.webp

This is expected because I'm using two different XF installations on the same server.

My only logical conclusion is that the un-prefixed entries exist from before you added the cookie prefix to your config.php file or you have another installation on the same server that you use which doesn't have a prefix set at all.
 
@Chris D, in addition to the informations I sent you in January following your post here:

May this issue has something to do with guest page caching? We had some trouble with different values for the same cookie on server and client as well, so that's my guess.
 
Top Bottom