exam review module 9 Flashcards
servers
DNS servers
computers that respond to requests for address lookups
ex: computer sends DNS server the name (website link) - it looks it up in a data base and returns with 129.97.167.19.
web server
a computer with the name www.student.cs.uwaterloo.ca with the address
129.97.179.19.
clients
the client = web browser running on a different computer than the web server.
¥ The same requests can be made for images <img></img>, which are also hosted on web servers.
¥ Modern webpages have dozens of additional references (HTML requests)
web servers role
response to HTTP requests and provide files
clients role
requests files via HTTP, interpret HTML files and make additional requests, display HTM: files properly
static web pages
Static = Does not change
if the code gets changed manually its a static page
dynamic web pages
Changes over time
A web page is dynamic if it automatically changes its content due to its “environment”.
server side dynamic web pages
also VLOOKUP relation
web pages that are changed dynamically by the web server
instead of simply fetching a web page, the web server could generate one.
Google search is like a very advanced version of Excel’s VLOOKUP function.
VLOOKUP is similar to Amazon -> provides dynamic web pages.
client side dynamic web pages
pages modified by the web browser
javascript
the web interprets and executes the code
- used for many applications, but works well for manipulating web pages.
javascript always begins with
cookies
how the web tracks your behaviour
when an HTTP request is amde, thr web server can send back a message to the client in addition to the web page
They increase the convenience of the web by remembering who you are and your credentials.
They can also be used for bad purposes, as web servers can identify you and send you unwanted ads.
query strings
Everything that appears after the ? is known as the query string.
A query string is made up of pairs of values, with
Each pair is separated by an ampersand (&)
The two values within the pair are separated by an equal sign (=)
ex:
http: //x.com/content?session=878d294f0d35&referral=alice&sound=off&course=cs100&page=3&auth=175b929384e06e4742930fd69133cf6c
variable weights
prioritize results list first, followed by answers list.
var weights = [
[[q1a1r1, q1a1r2, q1a1r3, … q1a1r?], [q1a2r1, q1a2r2, …], [q1a?s1, …]],
[[q2a1r1, q2a1r2, …], [q2a2r1, …], [q2a?r1, …]],
…
[[q?a1r1, q?a1r2, …], [q?a2r1, …], [q?a?r1, …]]
Q1A1R1, Q1A1R2, Q1A1R3, Q1A1R4,
Q1A2R1, Q1A2,R2, Q1A2R3, Q1A2R4,
Q1A3R1,Q1A3R2,Q1A3R3, Q1A3R4,
Q1A4R1,Q1A4,R2,Q1A4R3, Q1A4R4
Q2A1R1,Q2A1R2, Q2A1R3, Q2A1R4
Q2A2R1,Q2A2R2, Q2A2R3, Q2A2R4
Q2A3R1,Q2A3,R2,Q2A3R3, Q2A3R4
Q2A4R1,Q2A4,R2,Q2A4R3, Q2A4R4