Using html5 localstorage to retrieve data from the server to allow editing and adding a data source, and then save back to the server

I am creating a standard form for collecting user data that will be used by standard web browsers, as well as the iPhone and iPad. The application will allow users to create new entries, as well as edit and delete existing entries.

I have the point of using html5 'localstorage' to create a client-side data source and I'm looking for a direction to get existing data from the server to the client data source, and then the ability to edit or delete this data or add a new record to the existing data. Finally, the ability to save updated data on the server.

That sounds a lot, I know. But I am flipping through html5 lessons and can’t find exactly what I'm looking for.

+3
source share
1 answer

As you have decided to use HTML 5 localStorage, you will still use JavaScript. In this case, I think you should use XMLHttpRequestto retrieve and send data to the server. There are some great views online, such as the W3C working draft and Apple website , on MDC and on MSDN . Please find questions containing the AJAX tag .

BTW, ( ), JavaScript-/. . ( HTML 5 localStorage ).

+1

Source: https://habr.com/ru/post/1743752/


All Articles