CMSC 134 Introduction to Web - Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

flashcard set

Earn XP

Description and Tags

Flashcards about web technologies, URLs, HTTP, HTML, CSS, JavaScript, Same-Origin Policy, Cookies, and Session Management.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

What are examples of resources on the web?

Webpages, images, PDFs, etc.

2
New cards

What does URL stand for?

Uniform Resource Locator.

3
New cards

What are the three mandatory parts of a URL?

Protocol, location, and path.

4
New cards

What does the protocol part of a URL indicate?

Indicates how to retrieve the resource.

5
New cards

What are some examples of protocols?

http, https, ftp, ssh.

6
New cards

What does the location part of a URL specify?

Specifies where to retrieve the resource from.

7
New cards

What does the path part of a URL indicate?

Which resource on the server to retrieve.

8
New cards

What does the question mark (?) in a URL indicate?

Optional arguments or parameters in a URL.

9
New cards

How are parameters represented in a URL?

Key-value pairs separated by &.

10
New cards

What is the purpose of an anchor (#) in a URL?

Optional marker to put an element in focus, not sent to the server.

11
New cards

What is HTTP?

Hypertext Transfer Protocol, the language browsers and servers use to communicate.

12
New cards

What model does HTTP follow?

Client requests, server responds.

13
New cards

What does the first line of an HTTP request indicate?

Method, location, and version.

14
New cards

What is the difference between GET and POST requests?

GET requests do not change server state, POST requests are intended to change server state.

15
New cards

What are the core elements of a webpage?

HTML, CSS, JavaScript.

16
New cards

What is HTML?

Hypertext Markup Language, allows us to create structured documents.

17
New cards

What is CSS?

Cascading Style Sheets, modifies appearance of HTML.

18
New cards

What is JavaScript?

The language of the web, able to manipulate HTML/CSS via DOM, enables dynamic webpages.

19
New cards

Why is having multiple open webpages a security risk, and what policy mitigates this?

Multiple open webpages pose a security risk, mitigated by the Same-Origin Policy.

20
New cards

What is the Same-Origin Policy?

Browser policy preventing webpages from accessing other open webpages unless they have the same origin.

21
New cards

What determines the origin of a webpage?

Protocol, domain name, and port.

22
New cards

What are the exceptions to the Same-Origin Policy?

JavaScript, images, and frames.

23
New cards

How do browsers and servers store state?

Browsers and servers store state via cookies, which are sent with every request.

24
New cards

What is a cookie?

A name-value pair.

25
New cards

What are the attributes of a cookie?

Domain and Path, Secure, HttpOnly, Expires.

26
New cards

What do the Domain and Path attributes specify for cookies?

Specifies which domains and paths to attach the cookie with.

27
New cards

What does the Secure attribute do for cookies?

Prevents cookie from being sent over an unsecure channel (HTTP).

28
New cards

What does the HttpOnly attribute do for cookies?

Prevents cookie from being read via JavaScript.

29
New cards

What does the Expires attribute do for cookies?

Tells browser to delete the cookie after a timestamp.

30
New cards

How does session management work?

Server generates and sends session token as a cookie, keeping a mapping between users and tokens.