July 15, 2026 · 5 min read
Secure, HttpOnly, SameSite: What Your Cookies Should Look Like
Cookies are how most websites remember that you're logged in between page loads. That makes them a high-value target — and three small flags on each cookie decide how much protection it actually gets.
Secure — Only Sent Over HTTPS
Without the Secure flag, a browser will happily send a cookie over plain, unencrypted HTTP too. On a shared network — public WiFi, for instance — that means the cookie can potentially be intercepted in transit and reused by someone else.
HttpOnly — Invisible to JavaScript
A cookie with HttpOnly can't be read by any client-side JavaScript, including malicious scripts injected through an XSS vulnerability. Without it, a successful XSS attack can simply read the session cookie directly and hijack the account — HttpOnly closes that specific path.
SameSite — Limiting Cross-Site Requests
SameSite controls whether a cookie is sent along with requests originating from a different site. Set to Strict or Lax, it significantly reduces the risk of CSRF (Cross-Site Request Forgery), where a malicious page tricks a logged-in user's browser into making an unwanted authenticated request.
Why All Three Together Matter
Each flag closes a different attack path — network interception, script injection, and cross-site trickery. A session cookie missing even one of the three leaves a real gap, and in most frameworks setting all three correctly is a single configuration change, not a development project.
Check Your Cookies
Nexora Shield's Cookie Security Scanner checks any website's cookies for these three flags and reports exactly which ones are missing.
Ready to check your own website?
Run a Free ScanRelated Articles
PrivacyIs Your Email Address Safe? How to Check if It Has Been Leaked in a Data Breach (2026 Guide)
Learn how to check whether your email address has been exposed in a data breach, understand the risks, and follow practical steps to secure your online accounts
Phishing & MalwareI Clicked on a Phishing Link — What Should I Do? (Complete Recovery Guide 2026)
Accidentally clicked a phishing link? Learn exactly what to do if you entered your password, downloaded a file, or shared banking information. Step-by-step reco
Network SecuritySSL Certificate Checker: What Is SSL and Why Every Website Needs It
Search engines generally prefer secure websites, making HTTPS an important best practice for both security and user trust.