Edit Hyperlink... Slash or no slash... (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


ravenous_wolf -> Edit Hyperlink... Slash or no slash... (12/10/2004 21:13:19)

Okay, here is another silly newbie question.

In FrontPage, when I am inserting a hyperlink, like on a graphic using hyperlink properties, in the EDIT HYPERLINK dialog box, in the ADDRESS drop down box, what am I supposed to put down for the destination of where I want my link to go.

I am confused about the slash at the end of the address or do I put no slash like this:

http://www.yoursite.com

or do I include the slash at the end of the address???

http://www.yoursite.com/

Sorry to bug you guys with such a newbie question but I am about to insert quite a bit of links and I wanted to know which is the proper format.




Charles W Davis -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 0:21:35)

ravenous_wolf,

Either will work. If I am copying from the address bar in the browser, sometimes one will be there and other times not. I don't spend the time to either remove or add.




bobby -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 0:22:28)

As far as I know it does't make a difference. All modern browsers will interpret both the same way.

I don't ever use the / personally... I don't know if that's considered "correct"




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 2:32:26)

There must be some sort of protocol surrounding this issue though. While I agree that both work just as well as one another, I have a sneaking suspicion the slash on the end is correct.

The reason I came to this conclusion is that back when I used to use Linkbot Pro for checking lengthy pages of links, LBPro would report links without the / as being "redirected". I eventually learned that if I added the /, that error went away.

Maybe this was a quirk of LBPro, or maybe there is a protocol out there somewhere? [sm=ask.gif] I have no idea what to search for to find out though. Maybe an expert will pop in and tell us! [:)]




jaybee -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 6:23:33)

Heads up guys.

I didn't think it mattered either until about two months ago when I suddenly had all sorts of problems accessing one of my sites. Updates weren't appearing even though the control panel showed they were there. The host and I were tearing our hair out until I noticed I hadn't put the / on the end of the name in the DNS record.

Added that and it worked first go.

I also edit for a SE and rule one for checking all sites, before they are submitted...... make sure the / is on the end.

I suspect that most of the time you can get away with it but when things go wrong........ it's the last thing you think of.




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 6:35:07)

Ah, thanks jaybee - our very own "resident expert" [:)]




d a v e -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 7:13:20)

kitka i notied that too on the w3c link checker - I think too you can use either but you should put the trailing slash on to be correct (yeah right who does?!) but it will work fine without




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 7:20:42)

quote:

(yeah right who does?!)


When typing an address in my browser I don't bother using a /, but since my experience with LinkBot Pro, I have always used it in links on my web sites.




jaybee -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 7:33:46)

I think that's the problem. Browsers don't mind it not being there and that gives us a false sense of security.

When doing anything with hosting, DNS, redirects etc. always put a / on the end.




jaybee -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 7:35:41)

quote:

Ah, thanks jaybee - our very own "resident expert"


[sm=lol.gif][sm=lol.gif][sm=lol.gif]

Um no, not an expert just a "learned from bitter-experiencepert"




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 7:46:54)

quote:

"learned from bitter-experiencepert"


I think that is a natural part of the process in making an expert [:D]

And speaking of LinkBot Pro, I was sad when they stopped making it. Was a downright useful program. Now it is a tiny part of some corporate package called WebQA. Which is so expensive they don't even put the price on their web site. [:o]

I tried to find a replacement program a couple of years ago, but never did. [:(] Does anyone else remember it, or am I dating myself badly?




d a v e -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 9:50:53)

would the w3c link checker do what you need?
http://validator.w3.org/checklink




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/11/2004 21:53:48)

quote:

would the w3c link checker do what you need?


Only partially, very slowly and laboriously. In the time it takes that site to check one page, LinkBot Pro checked a whole site and reported on all internal links as well as external, plus numerous other issues, like missing "alt" attributes, page titles, slow loading pages and a swag of other things that I can't quite remember.

With the w3C checker, having to type in each page's url separately, makes it very slow going especially for a large site.

Many thanks for the suggestion though [:)]




d a v e -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 4:55:43)

buy dreamweaver :)




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 5:06:37)

LOL!!! You heretic you! [:o] This is a forum primarily built around support for FrontPage [sm=tantrum.gif][sm=evileek.gif][sm=innocent.gif][sm=whistling.gif]

p.s wish I had the resources to buy Dreamweaver ....[:(]




d a v e -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 5:09:41)

couldn't resist ;)




Kitka -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 5:14:56)

[sm=lol.gif] [sm=lol.gif] [sm=lol.gif] [sm=lol.gif]




jeepless -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 12:23:33)

Getting back to the original question.....

I remember a thread about this subject on another board, Webmaster World, and it was suggested that it's ALWAYS a good practice to include a slash after a hyperlink if it's referring to a subfolder or a subdirectory under the root directory (eg. http://www.yoursite.com/subfolder/). I don't recall the technical details, but it had to do with cutting down the amount of communication involved between the browser and the server to pull up the correct page.

In simple terms this is what happens...

Without using a trailing slash: the browser opens a connection and calls the server with the URL http://www.yoursite.com/subfolder (notice the missing slash), but the server doesn't know if that URL refers to a FILE or a SUBFOLDER. So the server first goes looking for a FILE called "subfolder". When it doesn't find it, the server then responds to the browser, "Did you really mean the SUBDIRECTORY called "subfolder?" (a corrected URL) and the server then closes the connection. The browser then opens a new connection with the server and makes a second request saying, "Yes, I mean the SUBDIRECTORY called "subfolder" (the corrected URL), and the server then responds by sending the default page for that subfolder and again closes the connection. The result is that we had to open TWO connections to download the default page, and consequently forced the server/browser to make TWO round trips for that one page. That's generally considered to be "unnecessarily taxing the server's performance" by the web gurus.

With the trailing slash: the browser opens a connection and calls the server with the URL http://www.yoursite.com/subfolder/ (notice the trailing slash) and the server immediately knows that the browser is referring to a SUBDIRECTORY called "subfolder". The server then responds by sending the default page for that subfolder and closes the connection. One connection, one round trip!

In reality, forcing the server/browser communication into making two round trips to call up one page is virtually minimal and you would probably never notice a difference in speed. But with a very slow dial-up connection it might be noticeable. Still it's generally considered unnecessary and bad practice according to web gurus.

It should also be noted that using a trailing slash at the end of a URL that specifies the ROOT directory is unnecessary since the server and browser implicitly understand that a base URL (http://www.yoursite.com) always refers to a root directory and not a file. The server doesn't have to consult with the browser about what it really wants so the server sends the default page in the first connection. Therefore, trailing slashes on base URL's are not needed.

As stated on the "A List Apart" website:

quote:


The rule is "every URL that names a subdirectory should end with a trailing slash".

Why should we bother? Because:

1. We’re doing ourselves a favor, as this is the correct way to do things.
2. We’re doing our server a favor, as this means less disk access.
3. And most importantly, we’re doing our visitors a favor, because they’re no longer losing a few seconds while our server tries to first find a file and then a directory. And in this industry, you and I both know that a few seconds is a long, long time.


Hope that helps...




d a v e -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 13:49:24)

that's really helpful, thanks!




caz -> RE: Edit Hyperlink... Slash or no slash... (12/12/2004 19:49:47)

When browsing to a domain, it's best to include the trailing slash, as this tells the server to look in the root of the web directly. Leaving it out creates a little bit more work for the browser, b'cos it has to put that trailing slash in for you, and sends that to the server, and sometimes, can seriously slow down the repsonse time of the browser/server

It's all a matter of folders and things really....




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.46875