href = ?

Discussion in 'HTML' started by Frogleg, Sep 29, 2004.

  1. Frogleg

    Frogleg Guest

    Is there a rationale for preferring

    href="http://www.domain.com/index.com" over

    href="index.com"

    for a site where just a few pages are kept in a single directory?
     
    Frogleg, Sep 29, 2004
    #1
    1. Advertising

  2. Frogleg

    RobM Guest

    "Frogleg" <> wrote in message
    news:...
    > Is there a rationale for preferring
    >
    > href="http://www.domain.com/index.com" over
    >
    > href="index.com"
    >
    > for a site where just a few pages are kept in a single directory?


    Hi Frogleg...

    My 2c... I prefer the latter for portability:

    The code can run anywhere on any server, in any subdirectory (or web
    application), doesnt have to be changed if one server uses SSL (https), can
    run under a different port without being changed (e.g. testing at home using
    localhost:8081/index.com).. I'm sure there's more (easy on the browser?) but
    portability for me.

    Cheers
    RobM
     
    RobM, Sep 29, 2004
    #2
    1. Advertising

  3. Frogleg

    SpaceGirl Guest

    Frogleg wrote:
    > Is there a rationale for preferring
    >
    > href="http://www.domain.com/index.com" over
    >
    > href="index.com"
    >
    > for a site where just a few pages are kept in a single directory?



    er... that makes no sense.

    ..com files are executables
    ..exe files are too :)

    http://something.com/ (or some other extension) = a web site.

    http://www.domain.com/index.com would be a REALLY bad name for a page.

    http://www.domain.com/index.htm would be a lot better :)

    Anyway, your question doesn't make sense... you ask which is the best
    way, when both are completely and utterly wrong...



    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Sep 29, 2004
    #3
  4. Frogleg

    RobM Guest

    "SpaceGirl" <> wrote in message
    news:...
    > Frogleg wrote:
    > > Is there a rationale for preferring
    > >
    > > href="http://www.domain.com/index.com" over
    > > href="index.com"
    > >
    > > for a site where just a few pages are kept in a single directory?


    > er... that makes no sense.
    >
    > .com files are executables
    > .exe files are too :)
    >
    > http://something.com/ (or some other extension) = a web site.
    >
    > http://www.domain.com/index.com would be a REALLY bad name for a page.
    >
    > http://www.domain.com/index.htm would be a lot better :)
    >
    > Anyway, your question doesn't make sense... you ask which is the best
    > way, when both are completely and utterly wrong...
    >
    > x theSpaceGirl (miranda)
    >

    Hi - quick question (I ignored the OP's use of .com thinking spelling
    mustake) - just out of interest, what do you see utterly wrong with
    href="index.htm" ? Or do you mean it should be href="/index.htm" ?

    Thanks
    RobM
     
    RobM, Sep 29, 2004
    #4
  5. Frogleg

    SpaceGirl Guest

    RobM wrote:
    > "SpaceGirl" <> wrote in message
    > news:...
    >
    >>Frogleg wrote:
    >>
    >>>Is there a rationale for preferring
    >>>
    >>>href="http://www.domain.com/index.com" over
    >>>href="index.com"
    >>>
    >>>for a site where just a few pages are kept in a single directory?

    >
    >
    >>er... that makes no sense.
    >>
    >>.com files are executables
    >>.exe files are too :)
    >>
    >>http://something.com/ (or some other extension) = a web site.
    >>
    >>http://www.domain.com/index.com would be a REALLY bad name for a page.
    >>
    >>http://www.domain.com/index.htm would be a lot better :)
    >>
    >>Anyway, your question doesn't make sense... you ask which is the best
    >>way, when both are completely and utterly wrong...
    >>
    >>x theSpaceGirl (miranda)
    >>

    >
    > Hi - quick question (I ignored the OP's use of .com thinking spelling
    > mustake) - just out of interest, what do you see utterly wrong with
    > href="index.htm" ? Or do you mean it should be href="/index.htm" ?
    >
    > Thanks
    > RobM
    >
    >


    Nothing at all. I was just picking up the OPs' mistake :) There's no
    problem with absolute or relative paths... they both have their uses.

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Sep 29, 2004
    #5
  6. Frogleg

    RobM Guest

    > >>Anyway, your question doesn't make sense... you ask which is the best
    > >>way, when both are completely and utterly wrong...
    > >>
    > >>x theSpaceGirl (miranda)
    > >>

    > >
    > > Hi - quick question (I ignored the OP's use of .com thinking spelling
    > > mustake) - just out of interest, what do you see utterly wrong with
    > > href="index.htm" ? Or do you mean it should be href="/index.htm" ?
    > >
    > > Thanks
    > > RobM
    > >

    > Nothing at all. I was just picking up the OPs' mistake :) There's no
    > problem with absolute or relative paths... they both have their uses.
    > x theSpaceGirl (miranda)
    >


    Gotcha. Thanks. (Well spotted... perhaps OP had a problem because really was
    using .com!).
     
    RobM, Sep 29, 2004
    #6
  7. Frogleg

    Frogleg Guest

    On Wed, 29 Sep 2004 12:16:27 +0100, SpaceGirl
    <> wrote:

    >Frogleg wrote:
    >> Is there a rationale for preferring
    >>
    >> href="http://www.domain.com/index.com" over
    >>
    >> href="index.com"
    >>
    >> for a site where just a few pages are kept in a single directory?

    >
    >
    >er... that makes no sense.


    Oops. Sorry. Early morning typing. I meant

    href="http://www.domain.com/index.htm" and
    href="index.htm"
     
    Frogleg, Sep 29, 2004
    #7
  8. On Wed, 29 Sep 2004 11:02:38 +0000, Frogleg wrote:

    > Is there a rationale for preferring
    >
    > href="http://www.domain.com/index.com" over
    >
    > href="index.com"
    >
    > for a site where just a few pages are kept in a single directory?


    Some useful and relevant information (links to information, that is):

    <http://archive.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimerP2.html#RL>
    <http://www.google.com/search?q=relative+versus+absolute+URLs+&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8>
    <http://www.google.com/search?hl=en&lr=&ie=UTF-8&safe=off&q=relative+vs+absolute+URLs+&btnG=Search>

    later...
    --
    Jeffrey D. Silverman |
    Website | http://www.newtnotes.com

    Drop "PANTS" to reply by email
     
    Jeffrey Silverman, Sep 29, 2004
    #8
  9. Frogleg

    Toby Inkster Guest

    SpaceGirl wrote:

    > .com files are executables


    Not in this part of the world they're not.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Sep 29, 2004
    #9
  10. SpaceGirl <> wrote in message news:<>...
    > .com files are executables
    > .exe files are too :)
    >
    > http://something.com/ (or some other extension) = a web site.
    >
    > http://www.domain.com/index.com would be a REALLY bad name for a page.
    >
    > http://www.domain.com/index.htm would be a lot better :)


    http://www.domain.com/index.html would be even better as far as I'm
    concerned, since ".html" is the proper abbreviation of HTML (the "L"
    is part of the name of the format). ".htm" is a bastard Microsoftism.

    However, if index.htm[l] is the default index of the directory (as it
    usually is), it would be even better to reference it as
    http://www.domain.com/, or, if using a relative reference, as "./" (a
    dot followed by a slash), thus creating a reference to the directory
    index without the filename hardcoded, as I discuss here:
    http://webtips.dan.info/subdir.html

    On the other hand, file extensions have no official meaning in Web
    standards, so you can theoretically serve an HTML document from a URL
    containing a ".com" file extension, and it will be standards-compliant
    if sent with the proper MIME type. However, certain inferior (but
    popular) browsers violate the standards and second-guess MIME types
    based on things including the file extension, and hence might mess up
    if you do things like that.

    --
    Dan
     
    Daniel R. Tobias, Sep 29, 2004
    #10
  11. Frogleg

    Neal Guest

    On Wed, 29 Sep 2004 12:16:27 +0100, SpaceGirl
    <> wrote:

    > .com files are executables


    Actually, you can map any .whatever to any file type on the server. You
    can name all your pages with .cat or .dog if you want. In a HTTP context,
    it's not a filename extension in the typical OS sense. It's a world of its
    own.
     
    Neal, Sep 29, 2004
    #11
  12. SpaceGirl wrote:
    > Frogleg wrote:
    >
    >> Is there a rationale for preferring
    >>
    >> href="http://www.domain.com/index.com" over
    >>
    >> href="index.com"
    >>
    >> for a site where just a few pages are kept in a single directory?

    >
    > er... that makes no sense.
    >
    > .com files are executables
    > .exe files are too :)


    And the Web doesn't have extensions.
     
    Leif K-Brooks, Sep 29, 2004
    #12
  13. Frogleg

    SpaceGirl Guest

    Neal wrote:

    > On Wed, 29 Sep 2004 12:16:27 +0100, SpaceGirl
    > <> wrote:
    >
    >> .com files are executables

    >
    >
    > Actually, you can map any .whatever to any file type on the server. You
    > can name all your pages with .cat or .dog if you want. In a HTTP
    > context, it's not a filename extension in the typical OS sense. It's a
    > world of its own.


    yes of course mr pedantic pants - but it could be confusing for the poor
    end user, and if the web server is badly setup or does something weird
    with MIME? It's probably just not a good idea, even if it can be done, duh.

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Sep 29, 2004
    #13
  14. Frogleg

    SpaceGirl Guest

    Toby Inkster wrote:

    > SpaceGirl wrote:
    >
    >
    >>.com files are executables

    >
    >
    > Not in this part of the world they're not.
    >


    Another world, I'd suggest. Planet Linux. Population, 7 people and daddy
    Linus Torvil. A blessed world where everyone is always right, and
    nothing else matters. Yes? :)

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Sep 29, 2004
    #14
  15. Frogleg

    Sam Hughes Guest

    (Daniel R. Tobias) wrote in
    news::

    > SpaceGirl <> wrote in message
    > news:<>...
    >> .com files are executables
    >> .exe files are too :)
    >>
    >> http://something.com/ (or some other extension) = a web site.
    >>
    >> http://www.domain.com/index.com would be a REALLY bad name for a
    >> page.
    >>
    >> http://www.domain.com/index.htm would be a lot better :)

    >
    > http://www.domain.com/index.html would be even better as far as I'm
    > concerned, since ".html" is the proper abbreviation of HTML (the "L"
    > is part of the name of the format). ".htm" is a bastard Microsoftism.


    Pish posh. "HTML" is the abbreviation of "HyperText Markup Language."
    When talking about a document, however, it should be called a "HyperText
    Markup Document," because including "Language" would just be redundant
    and silly. Thus, HTM is the cooler acronym, and therefore, the cooler
    file extension.

    Of course, only the insecure want to be cool, so let's do the opposite of
    that: the rest of us can bask en mass in our individualistic usage of the
    bloated ".html" file extension.

    > However, if index.htm[l] is the default index of the directory (as it
    > usually is), it would be even better to reference it as
    > http://www.domain.com/, or, if using a relative reference, as "./" (a
    > dot followed by a slash), thus creating a reference to the directory
    > index without the filename hardcoded, as I discuss here:
    > http://webtips.dan.info/subdir.html
    >
    > On the other hand, file extensions have no official meaning in Web
    > standards,


    So let's use NO file extensions. Or use .exe for ordinary HTML documents
    :) Maybe some .scr too :-O

    > so you can theoretically serve an HTML document from a URL
    > containing a ".com" file extension, and it will be standards-compliant
    > if sent with the proper MIME type. However, certain inferior (but
    > popular) browsers violate the standards and second-guess MIME types
    > based on things including the file extension, and hence might mess up
    > if you do things like that.


    And so pages upon pages were _renamed_. The great beast looked on in
    curiousity, as they _blinded_ the eyes of Mammon into _confusion_ and
    _bewilderment_.
    from The Book of Mozilla, 9:29
     
    Sam Hughes, Sep 30, 2004
    #15
  16. Frogleg

    Neal Guest

    On Wed, 29 Sep 2004 23:38:21 +0100, SpaceGirl
    <> wrote:

    > Neal wrote:
    >
    >> On Wed, 29 Sep 2004 12:16:27 +0100, SpaceGirl
    >> <> wrote:
    >>
    >>> .com files are executables

    >>
    >>
    >> Actually, you can map any .whatever to any file type on the server. You
    >> can name all your pages with .cat or .dog if you want. In a HTTP
    >> context, it's not a filename extension in the typical OS sense. It's a
    >> world of its own.

    >
    > yes of course mr pedantic pants


    I LOVE it when you call me that.

    > - but it could be confusing for the poor end user, and if the web server
    > is badly setup or does something weird with MIME? It's probably just not
    > a good idea, even if it can be done, duh.


    Sure. But life is confusing. Big whoop.

    Let's talk about my pants some more...
     
    Neal, Sep 30, 2004
    #16
  17. Frogleg

    Toby Inkster Guest

    SpaceGirl wrote:

    > yes of course mr pedantic pants - but it could be confusing for the poor
    > end user


    Chances that the end user will look at the URL: one in ten.

    Chances that someone who looks at the URL will associate ".com" with an
    MS-DOS command rather than "dot com" websites: one in ten.

    Chances that someone who looks at the URL and *does* associate ".com" with
    MS-DOS understands that URL "extensions" are meaningless: one in three.

    So you might confuse 0.66% of users.

    But if you rename the file, lots of people will get 404 errors and get
    confused.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Sep 30, 2004
    #17
  18. In article <>, Frogleg
    <> wrote:

    > On Wed, 29 Sep 2004 12:16:27 +0100, SpaceGirl
    > <> wrote:
    >
    > >Frogleg wrote:
    > >> Is there a rationale for preferring
    > >>
    > >> href="http://www.domain.com/index.com" over
    > >>
    > >> href="index.com"
    > >>
    > >> for a site where just a few pages are kept in a single directory?

    > >
    > >
    > >er... that makes no sense.

    >
    > Oops. Sorry. Early morning typing. I meant
    >
    > href="http://www.domain.com/index.htm" and
    > href="index.htm"


    Assuming that www.domain.com is YOUR domain they are the same. The
    second version would be better since you could test your site offline
    by running from a single directory with all your html. Also if the
    domain name changed you would not need to change all of the html.

    --
    Dennis Marks
    http://www.dcs-chico.com/~denmarks/
    Mail to the return email address is bounced.
    Go to web site for active email address.


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Oct 2, 2004
    #18
  19. Frogleg

    Frogleg Guest

    On Sat, 02 Oct 2004 12:08:28 -0700, "Dennis M. Marks"
    <> wrote:

    >In article <>, Frogleg
    ><> wrote:
    >
    >> On Wed, 29 Sep 2004 12:16:27 +0100, SpaceGirl
    >> <> wrote:
    >>
    >> >Frogleg wrote:
    >> >> Is there a rationale for preferring
    >> >>
    >> >> href="http://www.domain.com/index.com" over
    >> >>
    >> >> href="index.com"
    >> >>
    >> >> for a site where just a few pages are kept in a single directory?


    >> >er... that makes no sense.

    >>
    >> Oops. Sorry. Early morning typing. I meant
    >>
    >> href="http://www.domain.com/index.htm" and
    >> href="index.htm"

    >
    >Assuming that www.domain.com is YOUR domain they are the same. The
    >second version would be better since you could test your site offline
    >by running from a single directory with all your html. Also if the
    >domain name changed you would not need to change all of the html.


    Thanks. OTOH, if I use "index.htm", I can view my site offline on my
    own system with any browser.

    I just wanted to know if there were any preferences for 'complete'
    local hrefs, and the rationale behind such a preference. Seems like
    there're more reasons to use the 'short' version, so I'll stick with
    it.
     
    Frogleg, Oct 14, 2004
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    203,046
    Adrienne Boswell
    Jun 20, 2006
  2. Soren Vejrum
    Replies:
    4
    Views:
    686
    Lasse Reichstein Nielsen
    Jul 5, 2003
  3. saiho.yuen
    Replies:
    3
    Views:
    472
    kaeli
    Sep 14, 2004
  4. Replies:
    2
    Views:
    543
  5. Vincent van Beveren

    BASE HREF and A HREF="#" onclick="..."

    Vincent van Beveren, Jul 6, 2006, in forum: Javascript
    Replies:
    2
    Views:
    360
    Vincent van Beveren
    Jul 6, 2006
Loading...

Share This Page