Save the code
There is no proper prompt to save your code if you forgot to, before leaving the webpage. The changed code gets erased if you forgot and left the page. The prompt to save before leaving page should be available.
marked this post as