How does a cookie expiration work?

How does a cookie expiration work?

aluferrarialuferrari Posts: 19Questions: 0Answers: 0
edited June 2012 in General
Hi,

Please help me understand the cookie expiration method.

We have set "CookieDuration: 600" i.e., 10mins.

- Does the cookie expires after 10mins from when it is loaded first time?
- Does it extend the expiry time if we load another data tables page or the same page within 10mins?
- What happens if user is still using the page and the cookie expiration time ends. Will the user loose all settings?

Thanks a lot.

Replies

  • allanallan Posts: 23,206Questions: 0Answers: 617
    It expires 10 minutes after it was last set, and it is is set on every redraw of the table.

    - Does it extend the expiry time if we load another data tables page or the same page within 10mins?

    Each DataTable uses an independent cookie - so one has no effect on another.

    - What happens if user is still using the page and the cookie expiration time ends. Will the user loose all settings?

    No - the current state is maintained. If they reloaded without a redraw, then yes they would then lose the state.

    Allan
  • aluferrarialuferrari Posts: 19Questions: 0Answers: 0
    Each DataTable uses an independent cookie - so one has no effect on another.
    But I see only 1 file per URL. Does it maintain all cookies in 1 file?

    Thanks.
  • allanallan Posts: 23,206Questions: 0Answers: 617
    What file? Cookies are held by the browser internally. They are in document.cookie and are semi-colon delimited.

    Allan
  • aluferrarialuferrari Posts: 19Questions: 0Answers: 0
    Thanks Allan
This discussion has been closed.