billandr Posted October 13, 2015 Report Share Posted October 13, 2015 (edited) I want to limit the number of OAVARS[] being added to a user's cookie. every page refresh adds a new one. What is the best way to prevent this or set a limit? Either prevent it or limit the number (e.g. check during the Max_AddCookie() function) Edited October 13, 2015 by billandr added more context to subject Quote Link to comment Share on other sites More sharing options...
billandr Posted October 13, 2015 Author Report Share Posted October 13, 2015 btw: as noted to other users have a similar problem - it eventually (after several page refreshes) - maxes out the cookie size - which then leads to failure.Am using avw.php; although there are other methods; isn't there a way (or has someone already done this) modified the Max_cookieAdd() to check the number already there and remove one of the first ones first; then adding the new one?For me; there never should be "site broken" - just because someone hit F5 too many times on a page that renders a single Ad. (not using any capping) Quote Link to comment Share on other sites More sharing options...
billandr Posted October 15, 2015 Author Report Share Posted October 15, 2015 Until I know of a better way to handle it; I've decided to ensure that no more than 10 are in the cookie. after 10; I remove one before adding the new one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.