in reply to Fetching titles and error handling

Download the headers first my $resp = $browser->head($url); then decide whether to get the rest after considering the content type and size.

Good Day,
    Dean