Lecture 4: Cookies
- Created by: Jam_Sheets
- Created on: 24-05-18 16:00
Other questions in this quiz
2. Is HTTP Stateless?
- Yes - HTTP is stateless. This means that web servers don't have the memory of the status of a connection so every connection will be considered as a fresh connection by the server.
- No - HTTP is not stateless. This means that web servers don't have the memory of the status of a connection so every connection will be considered as a fresh connection by the server.
3. CRUD Logic & PHP Functionality for Read
- Logic: Read the value from the cookie. PHP Functionality: $_COOKIE[].
- Logic: Set a cookie with name, value & expiry time & instruct the web browser to create it. PHP Function: setcookie() or setrawcookie()
- Logic: Set a new cookie with the same name and new value and/or expiry time to "override" the existing cookie. PHP Functionality: setcookie() or setrawcookie()
4. Which is not the Working Logic of a Cookie?
- https://imgur.com/a/bulGyAu - This is an image of the components of a cookie.
- When the client communicates with the web server for the first time, the web server sets the content of a cookie (e.g., the value and expiry date) and instructs the user agent (Web Browser) to create the cookie for the client.
- When it communicates with the web server next time: The server will be able to check the cookie to identify the client through the user agent.
5. CRUD Logic & PHP Functionality for Create
- Logic: Read the value from the cookie. PHP Function: $_COOKIE[].
- Logic: Set a cookie with name, value & expiry time & instruct the web browser to create it. PHP Function: setcookie() or setrawcookie()
- Logic: Set a new cookie with the same name and new value and/or expiry time to "override" the existing cookie. PHP Functionality: setcookie() or setrawcookie()
Comments
No comments have yet been made