About this interactive
A cookie is a small piece of data a site stores in your browser, so it can remember your session (that you are logged in, what is in your cart), your preferences (dark mode) or, for trackers, what you looked at. Two risks follow. Privacy: tracking cookies, usually set by ad networks embedded across many sites, can build a picture of where you go. Session hijacking: someone who steals your session cookie can use it to take over your session.
The Secure attribute is set by the server, by the people who run the application. It tells the browser to send that cookie only over HTTPS connections, so it never appears in unencrypted traffic that someone on the network could read.
That is all Secure does. The video says the browser encrypts the cookie and locks it to certain sites; neither is the Secure attribute. Browsers already keep each site's cookies from other sites. A script in the page, malware on the computer, a cookie that lasts too long, or a request triggered from another site are each handled by other settings and controls, such as HttpOnly and SameSite.
About TechKnowSurge
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →