note
Kanji
<p>[cpan://LWP] (or [cpan://WWW::Mechanize]) would let you load Page B and automatically follow the HTTP redirects, with the final URL being available to you in the <tt>uri</tt> method.</p>
<p>Where things get tricky is if any of the pages handle redirects via meta refresh or JavaScript.</p>
<p>The former is pretty easy to [id://447836|code around], but the latter usually requires prior knowledge of what the JavaScript is/does so that you can explictly tailor your code to handle it (and then hope no one changes it).</p>
<p>If you do expect a lot of JavaScript redirects, a better alternative might be to use either [cpan://Win32::IE::Mechanize] or [cpan://Mozilla::Mechanize], as both browsers have JavaScript engines and should be able to follow those redirects automatically (but I've used neither module, so can't confirm this).</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-33345">
<p>&nbsp; &nbsp; --k.</p><br>
</div></div>
516845
516845