Autosave, or Save time and nerve cells

    How often do we encounter the fact that while filling out certain forms on websites, when writing large texts in a blog or forum, the computer suddenly “freezes”. Or the Internet “disappears”. Or a finger accidentally lands on the navigation buttons (for example, “Back”), which are so “helpfully” placed by manufacturers of laptops and keyboards in the most inconvenient places.

    The result is always the same - we lose all the data that we have already collected. We are wasting valuable time on restoring already typed text, we are upset ... And, I think, the most expressive personalities have more than one keyboard already broken - like an outlet on which all anger can be frustrated.





    Let's look at the different ways in which you can solve the problem of "not losing your data."

    No. 1 - “Saving the drowning - the work of the drowning”

    After I personally lost several large enough typed texts several times and spoke quite emotionally about this, my colleagues suggested a great plugin for Firefox and Chrome - Lazarus .

    Lazarus periodically locally saves data of filled forms, is able to work with visual editors and AJAX forms. For security reasons, data stored on disk is encrypted.

    You can recover data in just two clicks!



    All in all a great thing!

    With the exception of a couple of minuses: firstly, not all browsers are supported, and secondly, the method is not applicable, for example, in an Internet cafe.

    No. 2 - “We use modern technologies - HTML5 Local Storage”

    If the user himself is not always able to protect himself, maybe website developers should take care of him?

    All modern browsers support such HTML5 feature as Local Storage. In essence, this is a local database in which key-value pairs can be stored.

    And it is Local Storage that can be used to automatically save data in web forms. At Habré, this approach has already been discussed, and even ready-made solutions are presented that developers can use in their projects.

    No. 3 - “We save data not locally, but on the server”.

    In the 11th version of “1C-Bitrix: Site Management”, a function for automatically saving data of web forms appeared.

    We considered different solutions to this problem. Including, of course, we thought about the possibility of using Local Storage. As a result, several key shortcomings were identified, due to which they abandoned this idea.
    • The most important issue is security. Several people can work on one computer, and the storage is shared (for one browser). The method is completely not applicable in public places (Internet cafe). Data can be read from local storage by virus, trojan, etc.
    • I want independence from the local computer. The battery in the laptop has run out, the disk has “flown” ... Such situations, of course, are not too frequent, but it’s nice to just open any other browser on another computer / mobile device and continue to work.

    Therefore, we decided to implement the autosave function on the server side, linking the data to the user profile, and not locally.

    This solves both issues: the safety and security of data are ensured, while the mechanism is universal - it works completely transparently and independently of the browser.

    How it works?

    If your site runs on “1C-Bitrix: Site Management” of the 11th version, then the autosave function is already enabled on most web forms of the administrative section, as well as in the forms for adding / editing pages and information block elements. Autosave will be connected to blogs and forums in the near future.

    If autosave works in the form, the following icon will appear in the right corner of the form (when editing in the administrative part):



    In forms called in the public part, the icon is located in the lower left corner of the form:



    Auto-save occurs all the time while the user edits the form. You can click on the icon and save manually - just in case. :) Well, or as an option of an “extreme draft”. :)

    If some kind of failure occurred during the creation of a new element, and not during the editing process, then autosave will work for the form of creating the corresponding new page / element. That is, the next time the add form is opened, a request for data recovery is displayed.



    We hope that the autosave function will make your work more comfortable and will allow you to save a lot of nerves and so expensive in our fast-paced century of time. :)

    Also popular now: