             @nb.dirty = false
 
     sync: () =>
+        if @readonly
+            return
         @save_button.icon_spin(start:true,delay:1000)
         @doc.sync () =>
             @save_button.icon_spin(false)

                            @reload() # -- only thing we can do, really

    autosync: () =>
        @check_for_moved_server()  # only bother if document being changed.
        if @frame?.IPython?.notebook?.dirty and not @_reloading
            #console.log("causing sync")

        return not @save_button.hasClass('disabled')

    save: (cb) =>
        if not @nb? or @readonly
            cb?(); return
        @save_button.icon_spin(start:true, delay:1000)
        @nb._save_checkpoint?()
