in reply to Re: Creating a web crawler (theory)
in thread Creating a web crawler (theory)

A full URL forces the browser to revisit DNS? Where did you get that idea? Even if you have some wacky set-up where you aren't caching replies, it doesn't affect rendering. As for needless traffic, a DNS query isn't much compared to all those images we ask our browser to download.

Relative URLs are a convenience for our typing. To follow a link, the browser still needs to make it an absolute URL, then go where that URL says. A relative URL in an HTML page is not a secret signal to the browser to use some sort of quick fetching algorithm.

You might be thinking about the difference between external and internal redirections. An external redirection is a full HTTP response that cause the user-agent to fetch the resource from a different URL. An internal redirection can be caught by the web server and handled without another request from the user-agent. Neither of these have anything to do with HTML though.

--
brian d foy <bdfoy@cpan.org>

Replies are listed 'Best First'.
Re^3: Creating a web crawler (theory)
by gaal (Parson) on Jan 29, 2005 at 14:10 UTC
    Relative URLs do better than save typing. They save retyping. If you move a project inside a site or just rename it, with relative paths you don't have to hunt down all the links and change them.

      You don't have to hunt down and re-type the links when you use a Perl script to do it for you. :)

      --
      brian d foy <bdfoy@cpan.org>
        But then you have to write and debug a Perl script :)

        (Have it treat programmatically constructed paths etc.)