Initial autosave JS with ajax call