https://en.wikipedia.org/wiki/Informatics
) into the URL bar, or clicks on a link to go to the page. In either case, the user’s computer is the client, and their browser takes that address or link and uses it to create an HTTP Request—a request for data sent following the HyperText Transfer Protocol. This request is like a letter asking for information, and is sent to a different computer: the web server that contains that information..html
files containing code written in HTML (HyperText Markup Language). This code will specify the textual and semantic content of the web page. See the chapter HTML Fundamentals for details on HTML..css
files containing code written in CSS (Cascading Style Sheets). This code is used to specify styling and visual appearance properties (e.g., color and font) for the HTML content. See the chapter CSS Fundamentals for details on CSS..js
files containing code written in JavaScript. This code is used to specify interactive behaviors that the website will perform—for example, what should change when the user clicks a button. Note that JavaScript code are “programs” that sent over by the web server as part of the response, but are executed on the client’s computer. See the chapter JavaScript Fundamentals for details on JavaScript..png
, .jpg
, .gif
, etc), fonts, video or music files, etc..html
file inside your web browser by double-clicking on it (the same way you would open a .docx
file in MS Word):scheme
(also protocol
): the “language” that the computer will use to send the request for the resource (file).file
, meaning that the computer is accessing the resource from the file system. When sending requests to web servers, you would use https
(secure HTTP). Don’t use insecure http
!mailto
protocol for email links, or the tel
protocol for phone numbers.domain
: the address of the web server to request information from. You can think of this as the recipient of the request letter.file
protocol doesn’t require it, but for most web URIs this would be the address (e.g., google.com
or ischool.uw.edu
).port
(optional): used to determine where to connect to the web server. By default, web requests use port 80
, but some web servers accept connections on other ports—e.g., 8080
, 8000
and 3000
Coda 2 0 13 – one window web development suite. are all common on development servers, described below.path
: which resource on that web server you wish to access. For the file
protocol, this is the absolute path to the file on your computer. But even when using https
, for many web servers, this will be the relative path to the file, starting from the “root” folder of that server (which may not be the computer’s root folder). For example, if a server used /Users/joelross/
as its root, then the path to the above HTML file would be Desktop/index.html
(e.g., https://domain/Desktop/index.html
)./
as the “root” folder), most web servers will serve the file named index.html
from that folder (i.e., the path “defaults” to index.html
). As such, this is the traditional name for the HTML file containing a website’s home page.query
(optional): extra parameters (arguments) included in the request about what resource to access. The leading ?
is part of the query.fragment
(optional): indicates which part (“fragment”) of the resource to access. This is used for example to let the user “jump” to the middle of a web page. The leading #
is part of the fragment..html
file (open a web page) using the file
protocol by simply opening that file directly in the browser. This works fine for testing many client-side programs. However, there are a few client-side interactions that for security reasons only work if a web page is requested from a web server (e.g., via the http
or https
protocol).http.server
module). These servers, when started, will “serve” files using the current directory as the “root” folder. So again, if you start a server from /Users/joelross
, you will be able to access the Desktop/index.html
file at http://127.0.0.1:port/Desktop/index.html
(which port will depend on which development server you use).127.0.0.1
is the IP address for localhost
which is the domain of your local machine (the “local host”). Most development servers, when started, will tell you the URL for the server’s root directory.index.html
finds the file you expect.ctrl + c
cancel command. Otherwise, you’ll want to leave the server running in a background terminal as long as you are working on your project.live-server
utility, it will open a web browser to the root folder and automatically reload the page whenever you save changes to a file in that folder. This will make your life much, much better.