What's the meaning of "/" path here

I’m confused about the “/” path here, does it refer to the “/” in “http: //”? Thanks!

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

Challenge: Serve an HTML File

Link to the challenge:

Yes, basically it’s the address or location and name of the resource (file) you are trying to use.

Maybe these will help…

What is a URL?

absolute_urls_vs_relative_urls

It’s similar to paths on your local machine but for web resources

Windows:
C:\Users\Jdoe\Desktop\somefile.txt

Linux:
/home/somefile.txt

2 Likes

for example for freecodecamp, the “/” path would be freecodecamp.org/, the “/json” path would be freecodecamp.org/json

2 Likes

The / path is known as the root path, which as said, is the site root.

If you think of the path in terms of folders on the system the root path is the start of the partition/drive from which you can not go up any higher in the folder hierarchy. For a web server, it is the folder the site is located in (the web server root folder is not the systems root folder).

An analogy might be a building with floors. The basement is the root and the top floor is the last path. As an aside, just like buildings can’t be infinitely high (because of physics) you may have limits to how “long” the path can be on the system (and other file path limitations).

1 Like

Thanks, get it, and if I want to know more about this, what should I learn, the course of HTTP?

MDN has a lot of good starting resources.

1 Like

Thanks! :+1: :+1: :+1: MDN is a great website to learn web development, I like it too, and I wonder if you have any other course that is like free code camp learning by doing to recommend, thanks!

If you mean places like freeCodeCamp, I can’t really recommend any because I haven’t tried them. But most learning is project-based because theory without practice doesn’t work.

What really matters is your own engagement and willingness to learn and seek out information. Code a little every day, build stuff, and learn new things. If you have a question try to answer it yourself first. Learn to research topics and search for the necessary information. You will find people and places along the way that you like for different topics.

It is important to stay focused, if you try to do too much too quickly, it will just be overwhelming. It is a never-ending marathon, so pace yourself. The goal isn’t to become an encyclopedia but to learn how to use an encyclopedia efficiently. Everything moves so quickly in this space that what you know now isn’t as important as how well you can adapt and upgrade your knowledge to new things.

2 Likes

Can’t agree with any more, thanks!

To clarify, I don’t know why I said “Yes”, sorry I probably failed to edit that. As to the path, not the “http://” part, that is the protocol…

I think that link I posted has a section that goes over the anatomy of a url and discusses relative paths.

Path to Resource

(in the same document as link in my initial reply)

lasjorg gave a good explanation as well.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.