Re: St00pid newbie question about sending URLs to the default Web browser
Re: St00pid newbie question about sending URLs to the default Web browser
- Subject: Re: St00pid newbie question about sending URLs to the default Web browser
- From: Jim Correia <email@hidden>
- Date: Sat, 15 Dec 2001 00:41:22 -0500
At 7:10 PM -0800 12/14/01, Ben Hines wrote:
At 1:00 PM +0100 12/14/01, Stiphane Sudre wrote:
Actually IIRC,
[[NSWorkspace sharedWorkspace] openURL:[NSURL
URLWithString:@"http://www.stepwise.com/"]];
[[NSWorkspace sharedWorkspace] openURL:[NSURL
URLWithString:@"http://www.stepwise.com"]]; works fine here, no
trailing slash needed. Is there some reason to use it?
For anything but the top level, yes.
If you write
http://www.example.com/directory
The server will typically notice that directory is a directory, and
send the client a redirect to
http://www.example.com/directory/, then
the client does a re-request, and gets the correct resource. You can
avoid the extra round trip by specifying the correct URL in the first
place.
For the top level this is not necessary since in HTTP you cannot get
an empty string, so the client has to send a request for / when it is
omitted from the URL.