Kaynil
Coder
This is something that isn't used as much but I thought it was something still worth talking about. If you've used Microsoft CMD or any other software without a visual UI you might be familiar with this.
Two decades ago and more, websites tended to be pretty much set in stone. As a website developer, moving between hosts could be a big pain if you ever needed to change hosts or move your website to a subdomain or a different address you don't have to manually fix each URL. I've heard they are still being used in testing environments, but nowadays many think that they can be detrimental for SEO (even if apparently Google representatives say it doesn't make a difference for SEO with them) and cause unexpected behaviour, so it seems like nowadays it is more recommended for your live projects to stick to absolute ones.
For those of you who hadn't heard of relative URLs, they are when you don't see the full address. There's not a protocol or main domain. The target of the link works usually in relation to your current position and in relation to how you have built the directories between your website. You can specify a "Base URL" if you want, which can be useful for semi-relative links if you, for example, make the base link the directory after your domain page.
One commonly used is "../"to indicate the parent directory of where your current page is.
For example if you're in this page:
You're inside the Traditional directory. If you are trying to link to digital drawings from there, you need the url to jump back to the "drawing" directory and search for "digital".
I think the relative URL would be something like:
Feel free to correct me if I got it wrong, I tried to brush up on it but it's been so long and I didn't test things.
My favourite is "/" since that redirects to the top domain. And you usually have that to display whatever you want to make your "home page".
Anyway, do you guys use them at all?
Two decades ago and more, websites tended to be pretty much set in stone. As a website developer, moving between hosts could be a big pain if you ever needed to change hosts or move your website to a subdomain or a different address you don't have to manually fix each URL. I've heard they are still being used in testing environments, but nowadays many think that they can be detrimental for SEO (even if apparently Google representatives say it doesn't make a difference for SEO with them) and cause unexpected behaviour, so it seems like nowadays it is more recommended for your live projects to stick to absolute ones.
For those of you who hadn't heard of relative URLs, they are when you don't see the full address. There's not a protocol or main domain. The target of the link works usually in relation to your current position and in relation to how you have built the directories between your website. You can specify a "Base URL" if you want, which can be useful for semi-relative links if you, for example, make the base link the directory after your domain page.
One commonly used is "../"to indicate the parent directory of where your current page is.
For example if you're in this page:
Code:
http://www.example.com/portfolio/drawings/traditional/tpage1.htm
I think the relative URL would be something like:
HTML:
<a href="../digital/dpage1.htm">Digital drawings</a>
My favourite is "/" since that redirects to the top domain. And you usually have that to display whatever you want to make your "home page".
HTML:
<a href="/">Back to Index</a>
Anyway, do you guys use them at all?