Remembering information across different pages with JavaScript Cookies - New Version 2a

This Example vs. js_cookie_expS_pgToPg1newV1a.html:

This example uses only one function to accomplish the task, compared to the js_cookie_expS_pgToPg1newV1a.html example, which uses three different touchx() functions to do so.

So this example is more streamlined and sophisticated, but might be trickier to understand.
The js_cookie_expS_pgToPg1newV1a.html example may be easier to understand, but requires some redundancy to accomplish the same thing.

Remembers 1 cookie across 3 pages:
Remembers several pages later WHICH image/link you clicked on the first page - 10 second cookie expiry


one

Two

Three


Cookie name is "pg2pgwhichtouch"

Nothing is checked when the page loads.
But if you mousedown on the image or links, a corresponding string ("one" "two" or "three") is saved as the content of the cookie (which expires in 10 seconds), and the page redirects to the next page.