Patric Nøis
Patric Nøis

Reputation: 208

Chrome console won't continue with code when page is refreshed

I'm trying to run a code in Google Chrome console, but the problem is that the page is reloading and each time it reloads the code stops and getting removed from the console.

Is there any way to stop this?

Here is the code I'm trying to use:

document.getElementById("g1").checked = true;
document.getElementById("wr").submit();
window.location.href = 'https://www.webpage.com/?site=second'; //Here the code stops and get removed.
document.getElementById("b4").checked = true; //I want it to continue here
document.getElementById("we").submit();

Upvotes: 0

Views: 606

Answers (1)

Rodney Wormsbecher
Rodney Wormsbecher

Reputation: 927

I think you can use the preserve log feature for this:

enter image description here

Upvotes: 2

Related Questions