Sessions and Cookies

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:42 AM on 7/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

22 Terms

1
New cards

stateless protocol

<p></p>
2
New cards
  • Cookies

  • Sessions

These technologies help websites maintain user information across multiple pages

3
New cards

Cookie

A _____ is a small piece of data stored on the user's browser.

4
New cards

Cookie

It allows websites to remember information even after the browser is closed

5
New cards

4 KB

Cookie can contain almost any alphanumeric information (as long as it’s under ____) and can be retrieved from your computer and returned to the server

6
New cards

cookie

The website sends a small text file called a _____ to the user’s browser, which is then stored on the user’s device

7
New cards

personalized experience

Cookies enables the website to identify the user and deliver a ______ by utilizing the information stored in the cookie. Cookies would allow websites to remember specific user settings and enhance the browsing experience during future visits

8
New cards

before

Cookies must be sent ____ any output from your script

9
New cards

Cookies

Data remains after browser closes, can remember user preferences and is easy to implement

10
New cards

Cookies

Stored on user’s computer, can be modified by users, has limited storage size (~4 KB), and not suitable for sensitive information

11
New cards

Session

A _____ stores information on the server rather than the user's browser

12
New cards

Session ID

In session, only a _____ is stored in the browser

13
New cards

Session

Because the data remains on the server, _____ are more secure

14
New cards

session_start()

must be placed before any HTML output

15
New cards

unset();

Removing one session variable

16
New cards

session_start();
session_destroy();

Used during logout

17
New cards

Session

Data stored on the server, more secured, can store larger information, and is best for authentication

18
New cards

Session

Consumes server resources, lost when session expired, and is usually removed after browser inactivity

19
New cards

header()

The ____ function is used to send a raw HTTP header to the browser before any output is displayed

20
New cards

Output

Important Rule: No ____ Before header()

21
New cards
  • Sessions

  • Header()

In real-world applications, they are almost always used together

22
New cards
  • Session

  • Cookie

  • header()

  • ____ = Who are you?

  • ____= What do you prefer?

  • ____ = Where should you go next?