How to add a Cookie Policy to your site

How does JSPWiki implement Cookie notification ? #

If you want to implement a cookie policy (or other site policy) on your jspwiki site, you can do this by adding to the LeftMenu the following:

[{InsertPage page='Cookies Policy' show='once' section='1' }]

The user or site administrator can use any page it wants to use for putting the cookie policy description of its wiki.

Because the InsertPage plugin is added to the LeftMenu page, it will be invoked on each page visit on the wiki site.

The show='once' option indicates that the plugin will only insert the Cookie Policy page content (in this case only the first section of that page) during the first visit of the site.
All subsequent visits, the plugin will not insert the content because it has set a cookie during the first visit. (this is a so called once cookie)

By default the show='once' content is presented in a modal dialog box, floating above the main page content. Other styles are possible too. For more details, see InsertPagePlugin.

JSPWiki does not implement any specific code to generate the cookie dialog box. All is driven by the content of your wiki, in this case what you have added to your LeftMenu and the contents of the Cookies Policy page.

One more thing:#

JSPWiki always uses Cookies for its normal operations. A user cannot turn Cookies off. As a minimum, JSPWiki uses 2 cookies: one to keep track of the session (needed for editing), and one to store the user's preferences. The initial UserPreferences cookie values are determined by the administrator setting of your site, and are overwritten whenever the user modifies them.

This means that a user can never "opt-out" completely.  So the user has to accept. Tip: use an OK or Understood button on your cookie policy page. Optionally add a Cancel button to redirect away from your site)

All once cookies used by the InsertPage plugin can be viewed or deleted on the UserPreferences page.

Back to Haddock Template