Hacker News new | ask | show | jobs
by sake 1354 days ago
Using absolute links is the complete opposite of what you should do. If the page you are linking to lives in the same path, there is no reason not to link to it relatively. It makes the path structure more modular.
2 comments

Absolute links would be great for CSS, but being broken when creating the page/browsing the files locally makes it a non-starter imo.
What even is the <base> element?
Your being completely ignorant making this statement (about a personal webpage that is built from scratch). It is 100% their choice. How they reach the conclusion to write their links is 100% theirs.

"there is no reason not to link to it relatively." You have clearly been so isolated in your thinking, you are incorrect. Again, it is their link to share.

Indeed. Why would you teach to do things right when you can teach how to do them wrong?
Like I said. It is assumption of being 1 domain. Could be a personal web pages on 2 different domains. Ahah!
I feel like the common case, especially for new HTML devs, is to use one website.

And when they get more experienced, they'll probably want to migrate that site to a new host (for example my site was bbkane.github.io before I moved it to bbkane.com), which will break absolute links to the first (now down) domain. Yes, best practice is to set up a redirect from old to new anyway, but that's the kind of thing someone doing this for the first time doesn't think about.

So there's definitely a case for beginners using relative links. And it's less repetitive to type!

I'm also interested in how it is going to be for multicultural individuals (with their own personal webpages). You have 2 webpages English, German. Could be a collection of these pages only in English.