Setting session in header does not seem to work?

If I use session.setItem in the header it doesn’t seem to be set at all. Is this something known?

Hi Andreas,
I’m not sure that I fully understand to what you were referring by “Header”. Is it the site code?
Can you please send us the site URL and clarify where have you written this code?

Thanks,
Tal.