|
Note that this is a situation where you need the JavaScript attached in the head of the page rather than at the bottom of the body where most JavaScript goes.
Basically the processing would be
1. set count to zero
2. read the cookie if it exists replace the count with the value from the cookie
3. add 1 to the count
4. save the cookie
5. If the count is greater than 3 then redirect
|