DataTables logo DataTables

via Ad Packs
How does a cookie expiration work?
  • 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.
  • 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
  • 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.
  • What file? Cookies are held by the browser internally. They are in document.cookie and are semi-colon delimited.

    Allan
  • Thanks Allan
This discussion has been closed.
All Discussions