I have this slideshow I’m building and the client wants a tracking cookie to report where they have already been on the site, and load a different batch of images based on that.
There are 9 images in total, set into batches of three. I’ve done a random image loader before with PHP, just need some advice on how to do this here.
Thanks!
You can create cookies with the images Id’s to look if they match the cookies of the user. If they match, then this means that the user already see them and you show others.
A simple script to do this in javascript:
Also you can do this through PHP, read this http://php.net/manual/es/function.setcookie.php (It’s really well explained)
Now, to create cookie, do the following:
To evaluate the cookie, do this:
To delete it: