I am trying to run some code that refreshes the webpage, and THEN does the console log.
The issue is the console.log is happening before the page reload.
How do I adjust this to get the desired behavior?
The very act of refreshing a web page ends execution of scripts on that page, apart from what might be called in
If you need to cause something to happen after content has been reloaded, you’ll have to use something like a cookie to pass a message to the reloaded page indicating the action you want to take.