abilouise: (Default)
[personal profile] abilouise
How many people were reading my journal when I was talking about getting the HTML book to learn how to edit my own fucken website? Anyway, I am working on day 5, which is learning how to use links. So you all will suffer the wrath of my learning.
Eh. Fuck learning. I just hit a concept in the book that is the first one, I swear, that she does not explain in a way that I can understand. If anyone wants to explain relative and absolute pathnames to me in terms I will understand, be my guest. There may be fabulous prizes!
In other news I baked rye bread tonight but it came out more crumby than I wanted or expected it to. Phoo. But it still tastes great with good butter. No sandwiches though I think. And anyway, I don't think I'll ever be able to bake rye bread the way I really want it to come out. My least favorite thing about living outside of the metro New York area. sigh...

Date: 7 Sep 2005 06:11 (UTC)
From: [identity profile] abilouise.livejournal.com
You didn't make me feel like you're talking to a 5-year-old and I think I get it but I don't get WHY one of these would be better than the other. It sort of seems like you shouldn't need both, but I can't really explain why it feels this way.

Date: 7 Sep 2005 06:26 (UTC)
From: [identity profile] kilroi.livejournal.com
I generally think of absolute pathnames being better, because they more clearly delineate where something is. In my above example, if I use an absolute pathname as a link, no matter where I put myfile.html, it will always link to the right place.
(Of course, if you move the file you link to, you have to fix the link).

However! Let's say you had a nice gorgeous webpage built up, lots of links to itself all over the place, &c., &c. And it's all at htt p://www.kilroi.org.
But www.kilroi.org expires, and I have to get www.kilroi.net
( or www.i-am-a-loser.net). Now pointing to kilroi.org is no good, and I would have to go back and change everything, but if the organization of my *files* hadn't changed, just the server, all the links would still be correct and you wouldn't have to change anything, if you had used relative links.

So, if you think the structure of stuff with respect to the other files you are linking to will stay static, relative stuff can be nifty. However, it is harder to fix, in my mind, if you move things around, whereas if you have the full (aka absolute) path it is a little easier to see if you are linking to things in the wrong place in your original html code.

Relative versus absolute stuff is used not only in html code - so , in regular code, if you were going to ship something where the code itself never gets touched, relative links might be easier and shorter to type, or something. I suspect that most of it just comes from the UNIX commandline and being able to say
cd ../../../blah to go up 3 levels, and get the file you want, without having to type in a full pathname

Profile

abilouise: (Default)
abilouise

November 2020

S M T W T F S
1234567
8 91011121314
15161718192021
22232425262728
2930     

Style Credit

Expand Cut Tags

No cut tags
Page generated 2 January 2026 06:13
Powered by Dreamwidth Studios