HighDots Forums  

Don't want viewers to have to type in .htm to access awebpage

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Don't want viewers to have to type in .htm to access awebpage in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
John Waller
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to access a webpage - 03-04-2009 , 05:59 AM






Quote:
Actually, no; it's done at the server level.
OK, thanks Joe.

So the fact remains that the trailing slash doesn't need to be added by the
user.

--
Regards

John Waller



Reply With Quote
  #12  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to access a webpage - 03-04-2009 , 06:18 AM






On 04 Mar 2009 in macromedia.dreamweaver, John Waller wrote:

Quote:
Actually, no; it's done at the server level.

OK, thanks Joe.

So the fact remains that the trailing slash doesn't need to be added
by the user.
True.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/contact.php


Reply With Quote
  #13  
Old   
Sonjay
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to access a webpage - 03-04-2009 , 08:26 AM



On 3/4/09 6:18 AM, "Joe Makowiec" wrote:

Quote:
On 04 Mar 2009 in macromedia.dreamweaver, John Waller wrote:

Actually, no; it's done at the server level.

OK, thanks Joe.

So the fact remains that the trailing slash doesn't need to be added
by the user.

True.
But it's *better* if your links are coded *with* the trailing slash. Notice
the two lines of sample server log that Joe posted:

10.10.29.5 - - [04/Mar/2009:05:49:53 -0500] "GET /page HTTP/1.1" 301 315 "-"
10.10.29.5 - - [04/Mar/2009:05:49:53 -0500] "GET /page/ HTTP/1.1" 200 4325
"-"

Notice anything about that first request, for /page without the trailing
slash? The server calls it a a 301 (permanently moved) and redirects it to
/page/ with the slash.

That means that every page request from the browser actually results in
*two* pages requests for the server. On a busy site that can slow things
down.

Also, even though the search engines have gotten pretty good at handling
301s, I can't imagine it's good for search engine optimization, either. If I
were Google, and I saw that every internal link on your site resulted in a
301, I'd probably be somewhat skeptical about your site as a whole.

--
Sonjay





Reply With Quote
  #14  
Old   
alexy_han
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to accessa webpage - 03-04-2009 , 08:42 AM



Hi all,

Tried it this morning, and it works! ;-) I'll use it for the next little
while then.

And, Sonjay, I'm wondering, is there a better alternative than this if it
actually results in two page requests for the server?

Thanks,

Alexy


Reply With Quote
  #15  
Old   
Sonjay
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to access a webpage - 03-04-2009 , 08:50 AM



On 3/4/09 8:42 AM, "alexy_han" wrote:
Quote:
And, Sonjay, I'm wondering, is there a better alternative than this if it
actually results in two page requests for the server?

Thanks,

Alexy

Well, sure, and it's very easy. Your links should all use the trailing
slash:

CORRECT: <a href="/page/">My Page</a>

Don't leave the trailing slash out of your links, like this:
INCORRECT: <a href="/page">My Page</a>

As long as your links correctly include the trailing slash, there's no
server redirect, no 301, and no second page request.

--
Sonjay





Reply With Quote
  #16  
Old   
alexy_han
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to accessa webpage - 03-04-2009 , 09:42 AM



Hi Sonjay,

Thanks.

So that's what you do when it comes to a clickable link.

What do you do when the URL is printed out on a business card, for example, so
that the person has to type it out manually on the browser--e.g., boo.com/boo?

Alexy


Reply With Quote
  #17  
Old   
Sonjay
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to access a webpage - 03-04-2009 , 10:04 AM



On 3/4/09 9:42 AM, "alexy_han" wrote:

Quote:
Hi Sonjay,

Thanks.

So that's what you do when it comes to a clickable link.

What do you do when the URL is printed out on a business card, for example,
so
that the person has to type it out manually on the browser--e.g., boo.com/boo?

Alexy

I think it matters a lot less when it's printed on a business card or
brochure.

First off, the number of times people type in your URL from a business card
is likely to be a *lot* fewer than the number of times people click on links
in your site. So the server load isn't affected nearly as much if people
type it without the trailing slash and get redirected.

And as far as search engines, they don't read business cards, so they
couldn't care less what you put on there. You're not sending search engines
to 301 pages with every link.

--
Sonjay





Reply With Quote
  #18  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to access a webpage - 03-04-2009 , 11:19 AM



..oO(John Waller)

Quote:
Actually, no; it's done at the server level.

OK, thanks Joe.

So the fact remains that the trailing slash doesn't need to be added by the
user.
Not by the user, but by the author. Another round trip to the server
always requires bandwidth on both sides and time, which slows things
down. The correct URL will be handled faster and more efficient.

Quote:
One of the most wasteful redirects happens frequently and web
developers are generally not aware of it. It occurs when a trailing
slash (/) is missing from a URL that should otherwise have one. [...]
Avoid Redirects
http://developer.yahoo.com/performance/rules.html#redirects

Micha


Reply With Quote
  #19  
Old   
alexy_han
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to accessa webpage - 03-23-2009 , 06:40 PM



Hi all,

Ok. I'm back because I'm puzzled by the slash thing.

I use Dreamweaver, and I usually use the WYSIWYG version LOL. But I did peer
at the code. And basically I just go to Link field and pick the webpage to
point the link at.

I peered and typically I get code like
-- <a href="contact_me.htm">contact me</a>
-- <a href="index.html" class="link_white">home </a>

However, I do notice that for images, I tend to get results like

-- <img src="../IMAGES/spacer_lined.gif" width="14" height="13" align="middle">

So images have the .. and what looks like the trailing slash, however, they
are images only, and don't point to anything, e.g., they aren't "live." That I
know of anyway. LOL.

In any case, I don't know if, in my case, the trailing slash is automatically
included or not here for my live links, or whether I need to manually insert
the code. Which is a lot of work for me if I have to revise all links ...

Comments? Suggestions?

Thanks,

Sandra



Reply With Quote
  #20  
Old   
alexy_han
 
Posts: n/a

Default Re: Don't want viewers to have to type in .htm to accessa webpage - 03-23-2009 , 06:44 PM



Another related issue.

This is related to the original question of boo.com/hello, wherein I put the
"hello" webpage into its own folder, then I don't have to require the viewer to
type in .htm in order for the "hello" webpage to show up properly.

I found that I had to type in the full URL for the menu options, e.g.,
http://www.boo.com/menu_option_1, etc., in order for the menu options to work.

Because otherwise they will change automatically to
http://www.boo.com/hello/menu_option_1.htm, which doesn't exist.

In other words, the menu options assume the webpages are in the same folder as
the "hello" webpage.

I'm using the full URL for all menu options for this one webpage, but would
like to hear from any of you if you know of a better way to manage this.

Thanks!

Alexy


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.