Hi
I know that there's a question about this already, but all of the answers don't seem to be working for me.
I'm trying to make the JS console not reset on navigation.
I know there's the "Preserve log upon navigation" checkbox/button, but it's not working for me.
Whatever I entered is cleared and the page is loaded as default. How can I make it save what I changed, like a kind of add-on? (preferably without installing any additional tools)
..Or am I misunderstanding the use of the preserve log upon navigation thing?
Anyway, how can I achieve what I'm hoping to?
Thanks in advance!
2 Answers
The "Preserve log upon navigation" setting doesn't store any changes you've made to the DOM using the console, it only preserves the log of what has been output to the console.
As far as I know there is no way to preserve the changes you've made via the console across links/refreshes since you are always loading/reloading the page. I doubt there are even add-ons to preserve that kind of thing.

- 5,205
- 5
- 28
- 37
As winterblood stated in his answer, there's no way to preserve the changes made to any js file or the dom after a page refresh.
What you CAN preserve however are the breakpoints in the code. So if you need to place a change very early on, you can search the first script to be loaded, put a breakpoint in it, and refresh the page. When the page refreshes, then you can make any changes on it that you wish.
Another solution is to use a proxy like charles or fiddler, and do a "map local" of a local js file with your changes in it. See this link for that. I do this a lot in my work. It's dead easy to copy/paste a file from the chrome console into a local file, then use charles to do a map local of the request for that file and reload the page. If everything goes well, you will be able to do any changes you want to that file without modifying anything else in the page.

- 26,057
- 6
- 30
- 33
-
Thanks! I'll try this out - normally there's Tampermonkey for Chrome, which is like Greasemonkey for Firefox, but I can't seem to install that (probably because I have a modified version of chrome) - but I'll definitely give the proxy a try. – Adam May 10 '13 at 14:13