How to store large data in JavaScript cookies?

JavascriptWeb DevelopmentFront End Technology

To store large values in JavaScript cookies, try the following possibilities −

  • Create a "session id" and save the settings in a database. Then store the session id in the cookie.
  • Store the indexes of the selected items. Let’s say the selected items are the first 20 items on the list −
  • P[0,19]
  • Create a table to store cookies data such as −
  • [ data_id , data , data_create , date_expire ]
  • Store data_id in a table and when a user visits, get the data_id in cookies.
raja
Published on 31-Jan-2018 16:56:23
Advertisements