How to reliably check if the "JSESSIONID" cookie was set in the client browser?

@carehart I don’t like Twitter/Slack exactly because of that and always appreciate your postings here. I’m on slack, but I don’t like that medium because of lack of persistance and searchability. I use this Lucee forum also as some sort of documentation.

@Knut I had a similar issue once with cookie detection, but that was some time ago. what I did was some kind of cookie checker . Basically it was a template that would set a cookie and then auto reload with:

<meta http-equiv=”refresh” content=”2" />

Not the nicest, but that was back 10 years ago and it worked pretty well. It’s not 100% foolproof, but I did well at that time.

What comest to my mind now: Today I’d try it with an embedded iframe, where the main page would set the cookies, and the template in the iframe would then make a second request to another template for checking for that cookie. If it’s available you can break out of that iframe and redirect to another page with javascript.

For third party cookies I’d use the same technique, but with the difference that I’d use a second own (different) domain for that hosted on the same machine. But you might need to set up same-origin specs to avoic cross origin browser problems. But since you are owner of both domains, that can may work.

Alternatively to those iframes, you could even embbed an image with a cfml template, e.g. <img src="imageCookieTest.cfm"... and in that imageCookieTest.cfm you could test for cookies. I have multiple ideas, but I’d need to check for the best solution.