Last active
August 10, 2016 17:09
-
-
Save jhyland87/b002c86ad3e843c977b0791e078a4120 to your computer and use it in GitHub Desktop.
Example of how the DataTables Keep Conditions plugin stores conditions in the URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assume the table ID example has the following details in its current state | |
Select Row IDs | |
1, 3, 5, 6, 7, 8, 10, 11, 12, 14, 16, 21, 23, 24, 25, 30, 31, 32, 34, 36, 42, 44, 45, 46, 102, 103, 104, 107, 200, 202, 203, 204 | |
Table Filter | |
Hello World | |
Column Sorting | |
Col ID 1 (desc) | |
Column Order | |
4, 1, 2, 3, 5, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 17, 16 | |
Pagination Page | |
4 | |
// Hash Storage Convention Format Examples | |
Old Convention (135 chars in hash) | |
http://website.com/page.html#example-1=es1.3.5-8.10-12.14.16.21.23-25.30-32.24.26.42.44-46.102-104.107.200.202-204&fHello+World&od1&c4.1-3.5.7.6.8.9.10-15.17.16&p4 | |
http://website.com/page.html?example-1=es1.3.5-8.10-12.14.16.21.23-25.30-32.24.26.42.44-46.102-104.107.200.202-204&fHello+World&od1&c4.1-3.5.7.6.8.9.10-15.17.16&p4 | |
New Convention (103 chars in hash) | |
http://website.com/page.html#example-1=es135-8|1.0-246:2.13-5:3.0-246:4.24-6|10.2-47:20.02-4&fHello+World&od1&c41-357689|1.0-576&p4 | |
http://website.com/page.html?example-1=es135-8|1.0-246:2.13-5:3.0-246:4.24-6|10.2-47:20.02-4&fHello+World&od1&c41-357689|1.0-576&p4 | |
32 characters shorter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment