Bishnu Dev
Bishnu Dev

Reputation: 117

How To Detect Which Javascript Code is Causing the Page Redirection?

I am using a template downloaded from the internet which is completely free but the website from where i downloaded has added a link back to its homepage at the footer of the template. When i try to remove that particular link, my page redirects to its homepage URL.

How do i know which code is causing the page redirection?

I have already tried searching for its homepage URL in the source code, but i didn't find that. Can i monitor the JavaScript activities? If so how?

I also tried looking for third-party script linked to the document, unfortunately there are so many documents linked which makes it even harder to figure out the actual script.

Upvotes: 1

Views: 2865

Answers (1)

Daniel Manta
Daniel Manta

Reputation: 6683

Assuming there's a window.location.replace or window.location.href somewhere, try inspecting the page, switch off your internet connection and grab the error line from your Console or Network tab. It worked for me using Firefox Developer Tools.

Upvotes: 2

Related Questions