Exam - Dynamic web Flashcards
Connecting to website
- Client (PC) connects to server host
- client submits website request (the URL)
- Server returns website request + information
- client reads webcode –> displays to user
static vs dynamic webpage
static - does not change frequently, client only sends 1 request
dynamic - webpage contains variable info that changes over time. overall layout is the same, data displayed will vary between visits
server-side dynamic page
server generates webpage –> webpage sent to client
used for server-side info (eg stock prices, content hosting sites)
client-side dynamic page
server sends webpage code –> client generates the webpage
used for webpages that need to update per user activity
Server-side vs client-side operations - examples
server
- web-specific data updates
- Business logic code
client
- UI manipulation
- user responses
cookies - how they work
- stored by browser as encrypted client-specific info
- connect to site –> server provides cookie info –> client stores cookies
- reconnect to website later –> client sends cookies to server
- server uses cookie data to personalize the webpage
cookies - purpose
- authetication/verificaiton data –> allow auto-login
- session data (pickup where you left off)
- tracking user behaviour
- web preferences
website asks for cookies? why?
server is asking if it can use cookies to track user behaviour
asking permission –> usually related to privacy policies
Third party cookies
click on embedded ads –> generates cookies for the advertiser NOT the website
allows advertising cookies to be carried over and used on other websites
Cookies vs incognito
cookies are wiped when the browser is closed
also wipes other data (cached data, history)
website polling
some types of webpage data varies live in the same session –> requires webpage to update
event-driven –> user activity, webpage updates accordingly (eg webchats)
async comms polling –> client/server periodically send eachother updated info (eg stock prices)
query strings
the portion of the URL after the main web link (after the “?”)
www.example.com/page?QUERY_STRING
used by client to
- view specific parts of the webpage (eg top rated vs newly submitted)
- assign unique session identifier (allow browsing a website on multiple pages at once)
cookies vs query string
cookie - personalization of webbrowsing, stored by client
query string - used to identify/browse specific pages of the website simultaneously. INDEPENDANT OF COOKIES (not based on personalzation)