Forum Moderators: coopster
I'm pretty comfortable with the process, and I'm even aware of some of the disadvantages too.
I know using PHP you can assign a cookie, but you need the visitor to go to a second page to test weather the visitor has accepted it or not.
Personally, I'm not a big fan of having to wait around for the visitor to travel to a second page before I can see if my cookie was accepted or not; so I'm trying to find a way around that.
Say I have a page where I want to assign a cookie. Would I be able to embed two images into the page; with the first image, when loaded, would actually run a PHP script that assigns the visitor cookie and return a null image. Then the second image, which would also run a PHP script that returns a null image, could simply detect if the cookie was accepted or not?
I could use javascript to stagger the loading of these images, so the second one will occur after the first, and not be required to be embedded.
Any thoughts?
In the main page set the cookie, in the picture (it should be a real picture, otherwise you would get a nasty cross - no picture found) check for the cookie, and voile.
No need to stag the loading, cause cookies are set in headers, the same goes with reading them.
Regards
Michal