[wp-trac] [WordPress Trac] #23220: Extend autosave to use the browser's local storage in addition to saving to the server

WordPress Trac noreply at wordpress.org
Mon Mar 11 05:55:47 UTC 2013


#23220: Extend autosave to use the browser's local storage in addition to saving to
the server
----------------------------+------------------
 Reporter:  azaozz          |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.6
Component:  Autosave        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  autosave-redo   |
----------------------------+------------------

Comment (by azaozz):

 In 23220-6.patch​:

 - Use sessionStorage. Advantages: better security - auto-removed when the
 browser window/tab is closed. No size restrictions in most browsers.
 Disadvantages: doesn't persist after the browser tab is closed. Session
 storage covers the most common cause of lost content: errors on submitting
 the form caused by lost connection, nonces, browser crashes, etc. The only
 limitation is that the user has to stay in the current browser tab and
 click the Back button.

 - Minimal UI letting the user know the current post doesn't match the
 stored backup. The content can be restored and then the restore can be
 undone.

 - Empty the storage on logging out.

 The main advantage of using localStorage is that the user can quit the
 browser, open it later, log in, and the unsaved changes can be auto-saved.
 This would benefit mostly users that have very unreliable Internet
 connection, perhaps travelling, etc. A big disadvantage is that the 5MB
 size is shared for subdomains as @Viper007Bond points out above.

 The best way to implement localStorage is to ask the user to enable it on
 each computer he logs on from and to have control over emptying the
 storage. However this moves into a plugin territory. It is possible to
 switch between sessionStorage and localStorage depending on the login
 terms (the Remember Me checkbox). However the differences will be quite
 hard to explain to most users and confusing for probably all users.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23220#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list