简体   繁体   中英

To retain form values such as dropdown and radio buttons without using any webstorage

I have a form and wanted to retain its values when form loads without using any web storage.

I want to use only Javascript or jQuery. Moreover, I want that form values such as radio and dropdown selected value should retain its previous filled values.

You can either use browser cache or cookies to retain data on the client side. But both have their own limitations. Smartphone Browser native cache is about 5x times slower than local storage and information about cookies is sent to the server in the request header when a user visits a page that has cookies associated with it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM