SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    May 2000
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Up until now I have been building my websites on my desktop and then uploading them to the server. When done like that, I have an exact replica on my desktop as the site on the internet.

    I have been using relative links to do so. So when I get down three or four folders deep, I end up having to place a "../../../" in front of all my images and links to root files.

    Thats annoying to me but it makes working on the site much easier because its all done on my desktop then uploaded once the debugging is done.

    Then I found SSI. Now that my sites are hosted on Linux servers and I am trying to work in SSI calls, Im finding that using relative links arent working so swell anymore. And since they arent working so good, its beginning to make me do all my work on the server and I havent been able to figure out a way to store a duplicate site on my desktop to work on.

    When I try to use the root directory call "/" before linking to my images folder or root files, it works fine on the server, however, on the desktop doesn't work. Am I trying do go about this the wrong way?

    So what im trying to figure out here is what the best way to do updates and maintenance on your site may be. I would like to ask all of you how you manage your sites. Whether you use SSI or not, whether you have a desktop copy or not, or do you simply keep your site on the server and view the actual URL to see the changes you just made. Do you use relative or absolute links? Or both? and if both, then when do you use either and why?

    When those of you use SSI, do you use absolute URLs for the links & images included in the SSI file?

    Any information that you can share on how you build your site and manage its links would be appreciated. Im finding myself very confused on this matter.

  2. #2
    SitePoint Wizard
    Join Date
    Sep 1999
    Posts
    1,390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its impossible (I think) to see the effects of SSI on your computer unless you have a server or some really cool guy invents awesome software.

    Changes to SSI calls are usually minor once the site is up, and can be easily corrected if anything goes wrong, so it isn't too much a deal to modify the calls.

    I keep a prime copy on 2 physical hard drives and a weekly backup on each disk. Its fun to look at old copies of my site.

    Relative links are quicker than absolute links. Relative links require the browser to find the IP of the domain and then go to the page while relative links use the same domain. This saves a couple seconds. (In the browser status bar it says "Connecting to ...." when you use absolute links while this is skipped with absolute links)

    Good luck!

  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)
    Relative links are quicker than absolute links. Relative links require the browser to find the IP of the domain and then go to the page while relative links use the same domain. This saves a couple seconds. (In the browser status bar it says "Connecting to ...." when you use absolute links while this is skipped with absolute links)
    I believe he meant to say...

    Relative links are faster than absolute links. Absolute links require the browser to find the IP address of the Domain and then go to the page, while relative links use the same domain.

    (In the browser status bar it says "Connecting to ...." when you use absolute links while this is skipped with relative links)

    To solve your Problem
    Option 1: Install a webserver such as Apache or PWS on your PC. Make sure that your site resides in the home directory of your root web.

    Option 2: Got an old hard drive? A one gig drive will do just fine, smaller if you have it. Maybe you were thinking of upgrading anyways. Build your site in the root of a second harddrive that is dedicated to your site. This could even be a Zip Drive or some other removeable media.


    Then use '/' to start your relative links from the root. Using '../../../../' is easy but it will be even easier to maintain everything from the root because then you don't have to remember if your images are 100 levels up or 1.
    Wayne Luke
    ------------


  4. #4
    SitePoint Addict
    Join Date
    May 2000
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Beautiful!

    That would be great, I was considering moving all my files to the root directory on my HD anyway. I suppose if i created a 1 gig partition it would work great. And i have been needing to install a linux OS for a long time now.

    Though i think i am a bit lost now. Relative and absolute...

    I thought that absolute was to use "/"
    relative was to use "../"

    So by using the "/" im slowing down the sites performance?

    If im using SSI calls for my nav bar and its going to be used in all my directories, im basically forced to use "/" right?

  5. #5
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. If you're using SSI and you've, for example, a navigationbar on pages in multiple directories, you'll have to use '/' for the links in the navigationbar, else the links won't work in some directories. For my site, I always start links in the root directory, since it's much safer.
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  6. #6
    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)
    Assuming that pub_html is the public HTML directory that people can see in their browsers.
    i.e. C:\webs\webroot\pub_html\index.html

    Absolute is http://www.yourdomain.com/index.html

    Relative is /index.html
    Wayne Luke
    ------------



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
  •