Cookies with JS

Duration: 1 min

This video lesson is available to enrolled students.

Return to /learn/UP-POLICE-COMPUTER-OPERATOR/the-internet/server-side-security/server-side-scripting/asset-cookies-with-js after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. About the course: About the Course
  2. General Knowledge: Polity, Physics, Biology, State Wise GK, Chemistry, History, Geography, GK- Current Affairs, Indian Economy, Static General Knowledge, Environment, Evolution of Indian Banking (Banking & Financial Awareness)
  3. Mental Aptitude and Reasoning: Ratio and Proportion (Ratios), Divisibility Rules, Data Interpretation, Permutation and Combination, Number System, Sequence and Series (Series), Speed Time and Distance, Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Data Sufficiency, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Vocabulary, Profit and Loss, Arithmetic, Mental Ability, Percentage, Algebra, Mensuration and Geometry, Age Problems, Clock, Calendar, Verbal Analogy (Word Based Analogy), Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Analogy, Analytical Reasoning (Counting Figures Reasoning), Puzzle Solving (Puzzles), Selection Decision Table (Decision Making), Cubes & Dices, Blood Relations, Venn Diagram, Logical Sequence Of Words, Inequality, Directions (Direction Test), Data Arrangement, Facts, Inference and Judgements, Syllogisms, Seating Arrangements, Ranking, Order and Sequence
  4. CS | Computer Fundamentals: Basics of COA, Number System, Number Representation, C Fundamentals, Algorithm Analysis, Input Output Organisation
  5. CS | Database Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, SQL
  6. CS | Workplace productivity Tools: MS Office Applications, Keyboard Shortcuts
  7. CS | Computer Networks: Introduction to CN, Data Communication, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Transport Layer Services, Application Layer, Hardware Basics, Network Security
  8. CS | The Internet: Website, Browser & Services, Internet Fundamentals, Web Design & Development, Web Publishing & Hosting, Server Side & Security, Emerging Technologies
  9. CS | Emerging Technologies: Artificial Intelligence, Emerging Tech Trends, Introduction to OS, Windows OS, Linux OS, Unix OS, JavaScript-Basics
  10. CS | Boolean algebra: Digital Systems & Boolean Basics, Boolean Expression, Boolean Minimization, Logic Gates & Hardware
  11. CS | Data Structures: Introduction to DS, Array, Stack, Queue
  12. CS | Cryptography: Society, Law & Ethics, Cyber Threats and Malware Attacks, Role of Internet and Web Services, Security in Mobile and Wireless Computing, Electronic Data Interchange and E-Commerce, Physical Security and Cryptography Basics, Intrusion Detection Systems (IDS), Cyber Safety and Security
  13. UP Police Previous Year Papers:
  14. UP Police Full Mock Tests:
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This lecture segment introduces the fundamental concept of web cookies, defining them as small text files stored on a user's computer. The instructor explains that web servers are stateless; once a page is sent and the connection closes, the server forgets the user. Cookies were invented to solve this specific problem by allowing the storage of information, such as a user's name, so it can be remembered on future visits. The lesson then shifts to technical implementation, explaining that JavaScript can create, read, and delete cookies using the document.cookie property. A concrete code example is provided: document.cookie = "username=John Doe".

Chapters

  1. 0:00 – 0:59 00:00-00:59

    The video displays a slide titled "Cookies" with bullet points defining their purpose. The lecturer explains that cookies solve the problem of the server forgetting the user after a connection shuts down. She highlights the text "document.cookie" property in the "Create a Cookie with JavaScript" section. Finally, she writes "script output" on the slide to indicate the result of the code execution. The slide lists that cookies are data stored in small text files and that they allow a page to remember a user's name on subsequent visits.

The video effectively bridges the gap between theoretical web concepts and practical coding. It first establishes the necessity of cookies for maintaining user state in a stateless environment. It then provides the specific JavaScript syntax required to manipulate these cookies, demonstrating how a simple assignment statement can store user data locally. The progression moves from the "why" (solving statelessness) to the "how" (using document.cookie).

Loading lesson…