Skip to content Skip to sidebar Skip to footer

How To Keep An Array After Navigation Away To Another Page

Ok, so I have an array declared as so: var names_Array = []; Then I am creating a list and that list is composed of the elements in the above array. It is declared as so: var n

Solution 1:

There are a number of solutions you could try:

  1. store the information as a session object on the server and provide the data in the page each tie you visit.

  2. store the data in localStorage.

  3. store the data in a cookie.

The right answer depends too much on details of your application, so I suggest researching each of this options and choosing the best fit.

Post a Comment for "How To Keep An Array After Navigation Away To Another Page"