Build Your Own Business Website header image

What is the Difference Between the Local Path and the URL of a File?

Difficulty Level -

Filed Under Topics - ,

Listed Under Lesson Subjects -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

In this session we talk about the difference between the local path and the URL of a file. Both of these are two different kinds of pointers that point to the same place. We discuss what a local path is and give some examples of how it is being used depending upon the hosting environment.

Video Transcript

Member:  Just as of interest, what is the difference between the sort of the URL and the directory path? Don’t they kind of lead to the same place?

Rick:  Well, there are two different kinds of pointers. They do point to the same place but the local path is the path that doesn’t go through the web server. And so if you are including a file that needs to be used… say you’ve got another file that you’re using that has a bunch of code in it and you have to include it in your box code. And you say include once such and such. Well, you have to use the local path for that. and the local path is different depending upon the posting environment you’re in and so there’s no way to sort of automatically say what it is. But if you use… but if you have to use the local path in order to include the file.

However, if you’re referencing css files or javascript files, those are files that have to be loaded in the user’s browser so those are files that have to be served by the web server. That’s why you have both.

Member:  That was great. Thank you.

Rick:  You’re welcome. Anything else?

Member:  For this week, I’m good. I would take away and no doubt come back with a follow up question in a few days.

Rick:  Okay.

Member:  But thank you.

Rick:  You’re welcome. You have a great evening.

0 Comments… add one

Save $200 on Membership Now!

Start learning today for as little as
$0.82 PER DAY!
Subscription Options
0 comments… add one

Leave a Comment