0

I would like to know whether it is a good idea to use localstorage on e-commerce site so that users don't have to renter addresses between visits to the site

1 Answers1

0

Depends what you mean by local storage? Are you talking about client site cookies/cache or server side local storage?

Generally if you have an accountstore you just can save the address information within your database. When checking out an order, the user then just can select an address he already configured beforehand (eg. in his profile).

If you dont have that another possibility would just be to use the browsers built-in support for autocompletition?

  • I don't have a profile for the user. I noticed on another site that when you start the process of giving your shipping address but have not yet actually purchased product when you come back to the site the shipping information that you filled in is still present. I thought the way to accomplish this is by way of javascript localstorage but I'm not sure. That other site didn't have the user create a profile either. – user3740260 Aug 14 '21 at 14:07
  • Depends what your goal is. Browsers generally have built-in functionallity to remember data you once filled in a form. Browsers use different metrics and ways to determine if form data should be cached. You can edit your html in a way to make it easier for the browser to recognize such fields: https://stackoverflow.com/questions/7223168/how-to-trigger-autofill-in-google-chrome. On the other hand if you need autocompletition for example for a predefinedlist of countries to select from, then you would need javascript. – S. John Fagone Aug 14 '21 at 14:16