Relatives paths

In the lesson:

It says

Use relative paths during local testing to ensure links work without an internet connection.

Would you do that because you would subsequently change their location online or locally? How would you link that if you are using a relative path locally? I mean how would you tell the browser which folder to start with?

Can someone tell me how to remove the onebox in this instance? It doesn’t have the title of the lesson I’m quoting. Thank you for your help!

it’s linking to the lesson you are talking about, but if you want to remove it add a space at the beginning of the line

if you use a relative path, and then put the files on a server with a certain domain, the relative path still works. if you use an absolute path for the files, when you move the files somewhere else the path is still pointing to the previous positions. If you are pointing to an internal resource, always use relative paths

1 Like

The web server will have a local path to work from that it considers the root path of the website.

A relative path like /images/ would work if it’s on the local server, computer or hosted on the web (assuming the root of the server is configured in each case).

If your path is http://www.host.com/images/ That is going to need Internet access to resolve even if the path is ultimately on the local server.

1 Like

Then you just have to change the root if the paths are relative.

1 Like