pythonjupyter-notebookautosave

Turn Off Autosave in IPython Notebook


I'm looking for a way to turn OFF autosave in iPython notebook. I've seen references via Google/Stack Overflow searches on how to turn ON autosave but I want the opposite (to turn OFF autosave). It would be preferential if this was something that could be set permanently rather than at the top of each notebook.


Solution

  • If you add this to your custom.js, it will disable autosave for all notebooks:

    $([IPython.events]).on("notebook_loaded.Notebook", function () {
      IPython.notebook.set_autosave_interval(0);
    });
    

    custom.js is found at $(ipython locate profile)/static/custom/custom.js. You can use the same thing to increase or decrease the autosave interval. The value is in milliseconds, so an interval of 30000 means autosave every thirty seconds.