Current Assignment(s)
P1 Workshop (Submission)
Due 11:55PM Wednesday, 10.03
File- vs Directory-Based URLs
There are several ways we can control how our HTML
where our files are stored, retrieved by browsers, and how they appear in the address bar of a those browsers.
Consider the file “about.html,” found on your website:
We need to decide where to place this file in our directory, and how the site should locate it. This will also affect its URL.
Pages In and Outside Directories:
Browsers treat pages differently from other files. They have expectations of what pages will be titled, what languages they’ll use, and where they’ll live in the site directory.
This means browsers have some default behaviors they do automatically with pages when the site is accessed by a visitor. Where we put pages is a conscious decision on our part, mostly regarding keeping the site files organized and URLs clean. If you’ll remember, anything inside of a directory needs that directory added to its path in order to be accessed; too few or too many directories can clutter up your site and its pages’ URLs.
. ├── page-01.html └── directory-name/ └── page-02.html
development
- Previous
- Next