Cookie flavors |
Using cookies for authentication and preventing duplicate submissions is inherently unreliable, because many users disable cookies. If possible, use Basic Authentication. If preventing duplicate submissions is not important, always use Question Authentication. See Security.
There are three ways to specify what cookies ViewsFlash should use for detecting duplicates. By simply selecting Use Cookies in the Security page, a different cookie will be thrown for each different poll. The cookie is named VFpollid, where pollid is the poll's id. While convenient and simple, this can lead to cookie proliferation very quickly.
All ViewsFlash cookies have the shortest meaningful expiration date, depending on the closing dates of the polls they cover. They normally take on the domain of the server they are issued from, unless you use the cookie domain parameter in the Administration page. This is only recommended as a last resort.
Using the history parameter in the poll page style template allows you to specify a single cookie for multiple polls. There are two flavors of the history parameter, one centered around a place and one centered on a simple voting history.
place centered cookies use a history parameter like this:
history=1,cookiename,[/spotname],redirectinfo
The "redirectinfo" is optional, and when used it instructs ViewsFlash to redirect to that page after a successful vote.
The cookie thrown has the form:
|spotname:date|spotname:date|spotname:date|
The dates in the cookie are the next date when a visitor can vote in a particular spot (shorthand for place). This cookie format is useful when many departments of a site want to share a cookie. The cookie is never allowed to get larger than 256 bytes; earlier polls are removed while new ones are added at the end.
It is important that every poll used with this type of cookie always have an ending date, because when a poll is voted on which doesn't have one, the ending date is set to six months into the future, which could prevent a visitor from voting again for a very long time.
You can use separate cookies for each poll with this option, by using history=1,PFX[/pollname],[/spotname],redirectinfo
This will throw cookies named PFXmypoll, PFXanotherpoll, etc.. PFX is an arbitrary
string.
Poll centered cookies use a history parameter like this:
history=2,cookiename,redirectinfo
The cookie thrown has the form:
|pollid|pollid|pollid|
This is simply a list of the pollid's the visitor has voted in. When using this form, it would be a good idea to use a cookie for all the polls in a particular section of a site, to prevent cookie truncation. The cookie is never allowed to get larger than 256 bytes; earlier poll id's are removed while new ones are added at the end.