google chrome - Can I get the address bar url from the javascript console when the page has failed to load? -


just typed in bad hostname in address bar.

for example, wasn't running local web server, , load:

http://localhost/callback_url

in chrome, give me "this webpage not available" message.

is there anyway can find out url in address bar javascript console, though page failed load?

i know can use window.location.href this, returns "data:text/html,chromewebdata" in instance.

so in example, i'd know if there's javascript returns http://localohost/callback_url

edit: main reason i'd know if server side redirect failed when using chromedriver selenium. i'd prefer avoid using extensions if possible, , open chrome , chromedriver specific solutions if applicable! callback_url may have info in it, added server, , i'd see info is. i'd avoid running server data if possible.

enter image description here

the loadtimedata object included in err_connection_refused page has failed url:

> loadtimedata.data_.summary.failedurl "http://localhost/foo?request_url=bar" 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -