[HN Gopher] Debug browser redirects without ruining your day
___________________________________________________________________
Debug browser redirects without ruining your day
Author : cassidoo
Score : 24 points
Date : 2023-05-17 02:49 UTC (3 days ago)
(HTM) web link (dodov.dev)
(TXT) w3m dump (dodov.dev)
| WirelessGigabit wrote:
| Client side redirects aren't the only reason why Dev Tools
| sometimes drop stuff.
|
| I quite often try to debug a 201 and the body is not retained in
| the Dev Tools, even with 'Preserve logs' turned on.
| stranded22 wrote:
| Chrome has a much nicer redirect url checker - the link tools
| included in this article doesn't always work.
|
| If you can use chrome, then use this one, best I have found in my
| travels - https://chrome.google.com/webstore/detail/redirect-
| path/
|
| Other than that, I found this article really interesting - has
| gotten me into now exploring curl (especially after setting my pi
| 4 up as a mullvad vpn gateway with nextdns for my home network)
| montroser wrote:
| On the server side, punch into your web framework's redirect
| function a log with a stack trace in lower environments. That
| way, any time you send a redirect, you know which code was
| responsible, and there's no guess work involved.
|
| This is especially useful in the funnest kind of cases where you
| have mutual recursion or other types of loops.
| cmcconomy wrote:
| the worst is meta tag refresh - not many browser tools for
| disabling it
| eipi10_hn wrote:
| If three are no built-in tools for browsers, maybe use add-
| on/extension to disable it in the meantime?
| CoUHKT57BSe wrote:
| Hi, can't speak for any other browsers but with Firefox you can
| easily disable it without any tools. Just modify the setting
| accessibility.blockautorefresh (set it to true) in about:config
| and then when a page attemps to redirect you get a confirmation
| dialog (similar to when you block a popup) asking if you want
| to allow it to happen.
| iudqnolq wrote:
| I wish Firefox was as good as Chrome at correlating page visits
| and network requests.
|
| It particularly annoys me if you reload a page with a websocket
| open you see the logs for the websocket closing right at the
| start of the subsequent load. (Preserve logs is off of course)
|
| There are multiple decades old bugzilla discussions about
| Firefox's idiosyncratic websocket lifecycle handling. Not sure
| exactly which causes this, doesn't seem to be much point in
| debugging further
___________________________________________________________________
(page generated 2023-05-20 23:00 UTC)