SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Aug 1999
    Posts
    218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm laying out a new site and trying to figure out the best structure for the files.
    From what I can gather relative links ("page1.html") are better than absolute links (http://www.mysite.com/page1.html") for performance reasons.

    However I would also like to organize my site so that I have several subfolders with smaller numbers of pages in them. The problem I see here is that with using relative links this could get very confusing. Also, you would have to use absolute links anyways to get to folders "above" you in the directory structure.

    So what's it going to be? Relative or absolute? I'd prefer not to use both...

  2. #2
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to go one level up in the directory structure use ../page.html to go two up use ../../page.html and so on. Or you could also use a beginning '/' as in /directory/anotherdirectory/page.html which is the method I prefer, and you don't have to enter the entire domain name.

  3. #3
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Both are important. As Luzer said if you precede your directories with the root or "/" and then progress through the structure that is at least one less server hit you have to deal with. Also using relative directories makes it much easier to move your site from one host to another should the need arise.

    ------------------
    Wayne Luke
    Internet Media Provider


    [This message has been edited by wluke (edited March 08, 2000).]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •