The client can manually modify cookies that are stored to disk. This method requires clients to have cookies enabled in their Web browser. Cookies cannot store objects. If this is omitted, the cookie 'will be an in-memory cookie. In this case, the cookie is set to expire 'in twenty days.
Every page needs a form with hidden form fields that contain the state information.
Instead of linking and redirecting to pages, the form is submitted when a user browses to a different page. This method does not require cookies. It can be cumbersome to redirect and link to pages. This method cannot store objects. This stores the value that is set above in the hidden form field.