100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Lecture notes

Web Programming: Cookies, Sessions and the ORM Lecture Notes

Rating
-
Sold
-
Pages
6
Uploaded on
05-01-2025
Written in
2024/2025

Lecture Notes about cookies, sessions and the object-oriented model, how they work in websites and how to model them in Django. It has a summary section on the left side of the page, following the Cornell note taking method, where the key points are summarised on the side of the noted.

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
January 5, 2025
Number of pages
6
Written in
2024/2025
Type
Lecture notes
Professor(s)
Paulo oliva
Contains
All classes

Subjects

Content preview

3️⃣
Cookies, Sessions and ORM
SUMMARY MAIN NOTES

HTTP is a Contents
stateless HTTP
application-layer HttpRequest Object
protocol. It is Cookies

extensible Session
Cookies
Django uses an Proxies
HttpRequest Object Middleware
containing the Object-Relational Map
details Type Mapping
Field Options
body

method
HTTP
GET/POST
parameters
An application- layer protocol for
Cookies requests and responses sent between
META i.e. client-server.
HTTP headers
Aspects of HTTP:
sessions
simple and human-readable
Cookies are a
small piece of data extensible, easy to introduce new functionality
server sends to a
stateless: no link between two requests being
client. They allow
successively carried out on the same
for web
connection. Could bring problems when trying
applications to
to interact with certain pages coherently, but
store limited
cookies solve that.
amounts of data
and remember
state information
HttpRequest Object


Cookies, Sessions and ORM 1

, e.g. used to Upon an HTTP Request, Django creates HttpRequest

check if a Object containing request details

request is from
Body: raw HTTP request body as a byte string
the same client
method
they can be
used to GET/POST parameters, a dictionary
manage Cookies: dictionary with all cookies
sessions such
META: all variable HTTP headers
as carts,
scores, sign-in session: dictionary with session values (set by
status middleware)

personalisation
such as Cookies
language and
UI A small piece of data a server sends to
track and
a user’s web browser. They allow web
record user applications to store limited amounts of
behaviour data and remember state information
Similarly, a session
uses cookies, but Used to determine if different requests come from
the same client, then generate a personalised or
it used to store
generic response as appropriate. Uses:
information on the
server about a Session management: user sign-in status,
user to be used shopping cart contents, game scores, or any
across multiple other user session-related details the server
pages of the needs to remember
website
Personalisation: user preferences such as
They are display language and UI theme
encrypted
Tracking: recording and analysing user
while users are
behaviour
not

automatically
created and
removed with
💡 Can send cookies through HTTP request
Set-Cookie: <cookie-name>=<cookie-value> . They

opening and can have an expiration date or max age.




Cookies, Sessions and ORM 2
£6.56
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
ileniamaiettabusiness

Also available in package deal

Thumbnail
Package deal
ECS639U Web Programming Complete Lecture Notes
-
10 2025
£ 61.70 More info

Get to know the seller

Seller avatar
ileniamaiettabusiness Queen Mary, University of London
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
11 months
Number of followers
0
Documents
10
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions