Recall & Review
beginner
What is the purpose of HTTP security headers?
HTTP security headers help protect websites and users by instructing browsers how to behave securely, such as preventing attacks or data leaks.
Click to reveal answer
intermediate
What does the Content-Security-Policy (CSP) header do?
CSP controls which resources (like scripts or images) a browser is allowed to load, helping to prevent attacks like cross-site scripting (XSS).
Click to reveal answer
beginner
Explain the role of the Strict-Transport-Security (HSTS) header.
HSTS tells browsers to only connect to a website using HTTPS, which keeps data encrypted and safe from eavesdropping.
Click to reveal answer
intermediate
What does the X-Frame-Options header protect against?
It prevents a website from being shown inside a frame or iframe on another site, protecting against clickjacking attacks.
Click to reveal answer
intermediate
Why is the X-Content-Type-Options header important?
It stops browsers from guessing the type of content, which helps prevent some types of attacks by ensuring files are treated as intended.
Click to reveal answer
Which HTTP header forces browsers to use HTTPS connections only?
✗ Incorrect
Strict-Transport-Security (HSTS) tells browsers to only use HTTPS for the site.
What attack does the Content-Security-Policy header mainly help prevent?
✗ Incorrect
CSP restricts which scripts can run, helping to stop XSS attacks.
Which header helps prevent clickjacking by controlling framing?
✗ Incorrect
X-Frame-Options stops a page from being embedded in frames on other sites.
What does the X-Content-Type-Options header do?
✗ Incorrect
It tells browsers not to guess content types, reducing some attack risks.
Which header would you use to specify allowed sources for scripts and images?
✗ Incorrect
Content-Security-Policy defines which sources are allowed for content like scripts and images.
Describe the main HTTP security headers and their roles in protecting a website.
Think about how each header helps stop a specific type of attack or risk.
You got /4 concepts.
Explain why using HTTP security headers is important for website security.
Consider the benefits of instructing browsers on safe behavior.
You got /4 concepts.