I am trying to debug a webpage with chrome developer tools and the page redirects to a pdf file after it loads. I checked JavaScript files and there is not any place that we redirect the page. I cannot find any related message in developer tool console or network tab.
I activated event Listener Breakpoints
-> beforeunload
but it stops at an external js file (Placeholders.js) which is not related to redirecting.
Also, preserving Logs in network tab does not help me on finding root cause of redirect.
I am wondering how can I find the source of this redirect?
UPDATE: There is not any "refresh" meta tag in the html code.
Look at the developer tab in your browser of choice. It will show you the redirection together with it's reason.
There are a couple of things you can do. You can use the Event Listener Breakpoint -> Load - unload
and then when it breaks in the 3rd party library, right click and select Blackbox Script
. The next time you play through the code, it should only break in your own code (assuming there are no other 3rd party libraries to blackbox).
Another option is to go to the Network tab and check the Preserve Log
checkbox. This will persist all requests between page loads/navigation, so that you will be able to find the network request that returned the PDF response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With