layout: docs title: Table Cookie description: Table Cookie extension of Bootstrap Table. group: extensions
{% highlight html %} {% endhighlight %}
type: Boolean
Detail:
Set true
to save the state of a table (its paging position, ordering state, records per page).
false
type: String
Detail:
You must set this property if cookie option is enable to know when will expire the cookie created. Must use this format: 'number{letter}'
like '2h'
, in the letter position you can use: 's'
, 'mi'
, 'h'
, 'd'
, 'm'
, 'y'
, these means: 'seconds'
, 'minutes'
, 'hours'
, 'days'
, 'months'
, 'years'
.
2h
type: String
Detail:
you can tell the browser what path the cookie belongs to. By default, the cookie belongs to the current page.
null
type: String
Detail:
This is the website domain, with the www. prefix removed.
null
type: Boolean
Detail:
This property keeps cookie communication limited to encrypted transmission, directing browsers to use cookies only via secure/encrypted connections.
null
type: String
Detail:
You must set this property if the cookie property is enabled to set an unique cookie with an identifier for each table in your page or project. You must set this property because we need create cookies with an identifier.
''
type: String
Detail:
Set the storage that this extension will use. Use cookieStorage
or localStorage
or sessionStorage
.
cookieStorage
type: Array
Detail:
Set this array with the table properties (sortOrder, sortName, pageNumber, pageList, columns, searchText, filterControl) that you want to save
['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl']
parameters: undefined
Detail:
Return the saved cookies.
parameters: cookieName
Detail:
Delete the saved cookie by cookie name.