Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View source of file that is redirecting

When I click a URL a redirect is taking place using window.location

I'm trying to see the code behind this html file but since it is redirecting I am unable to view it. How can I view the source code the redirecting file ? Can I force the browser to not execute the javascript code and instead view it ?

like image 975
blue-sky Avatar asked Aug 28 '12 13:08

blue-sky


People also ask

How do I view all URL redirections in Chrome?

Inspect Element PaneRight-click on the page that is generating the redirect and choose "Inspect Element." Chrome opens a pane at the bottom of the browser window that shows all of the HTML code from the site. Scroll up to "<head>" in the Element Inspector and click the arrow next to it to expand the information.

Are redirects stored in browser history?

Redirect information will be stored in the transition type of each visit. The current history API only has a boolean flag for redirects.


2 Answers

You can just curl or wget on the page URL from the command line

curl http://page/

Curl does not interpret javascript, so you will get the exact HTTP response!

like image 43
ssb Avatar answered Sep 23 '22 02:09

ssb


Go to view-source:http://your-url-here/

like image 82
gmo Avatar answered Sep 24 '22 02:09

gmo