Bad links: continued

" https://github.com/appacademy/dotfiles/blob/master/linux.md "

Second to last, two links on this page. Text is “Atom” and “Google Chrome”

Fixed! They were incorrectly made into relative links when they should have been absolute. This comes up so often in code that it would be great practice to be able to explain the difference and when to use which. Anybody want to take a shot?

I don’t know much about the two types of links so I’d like to know.

An absolute link is everything you would find in the url of your browser. A relative link is just the part of the url which you find after the domain (.com .org etc) in your url.

Using relative links is useful if you expect the domain (including the sub domains so everything that comes before the .com .gov etc) to change and want your links to still function.
You need to use Absolute links if you are linking to a page on a different domain{including sub domains}
This is useful if you know that address will always exist(ie: Wikipedia)

1 Like

Nice Simon!

Just for clarification:

http://aaonline.io/a-ruby-project is an example of an absolute link because it includes the domain: http://aaonline.io

/a-ruby-project is an example of a relative link where the browser will determine the domain based on the current location. So whether our current location was http://aaonline.io or http://appacademy-online.herokuapp.com the link url would change accordingly becoming:

http://aaonline.io/a-ruby-project
http://appacademyonline.herokuapp.com/a-ruby-project

The Rule: Because of search engine optimization absolute links should always be the preference. The only advantage to relative links as that they are faster and easier to code.

Bonus Question: How do we setup staging websites using absolute links?

2 Likes

https://appacademy-online.herokuapp.com/environment-setup

While attempting to install the dotfiles on my linux mint machine I select the “how to manually install” link and find that it is also a dead link. I have managed to install atom and postgres on my 32 bit machine( one hell of a hassle let me tell you) but alas I am hitting a road block here.