Efficiently detect broken urls in Java -


what's efficient way detect broken url (http 404) in java? i'd in loop , take little time possible.

you can detect 404 after you've requested url: you'll header code (200, or 301 redirect, or 404 missing file), , can check that.

so you'll have request , wait possible 404.

there's rather comment below should not skipped, i'm repeating here: possible optimization (in case of existing urls): use head request instead of get.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -