URL exists?
Shari
gypsyware at earthlink.net
Fri Nov 7 10:31:01 EST 2003
>I think the only way that will be technically faster than this would
>be to use sockets, and make a HEAD request, rather than a GET for
>the url in question.
>
>You'd have to look up http protocol, but basically what it does it
>let you get just the http headers for a page rather than the
>contents. You'd also have to parse the return code...
>
>But it would be faster than fetching the whole page when it exists.
>If you want to try that, I can probably dig out a URL to read up on
>it.
>
>Depending on the circumstance, it might also help to do some sort of
>lookup on the domain name first and see if that fails-
>hostnameToAddress() for example.
>
>HTH
I originally tinkered with HostNameToAddress() and it works quickly
unless the page does not exist. Then it is very slow. Trouble is,
it checks that the whole domain exists, not specifically a page of it.
I have not tried sockets. They fall into the baffling category...
one of those areas I don't have a strong understanding of. I may
tinker with this though, as it is just too painfully slow as it is.
Shari
--
--Shareware Games for the Mac--
http://www.gypsyware.com
More information about the metacard
mailing list