What does the 'HttpOnly' attribute flag instruct a web browser to do when handling a specific session cookie? MCQ with Answer and Explanation

What does the 'HttpOnly' attribute flag instruct a web browser to do when handling a specific session cookie?
A. To force the web page content layout into a text-only presentation mode
B. To ensure the cookie only operates when accessing local intranet platforms
C. To delete the cookie instantly when the network switches to an alternative port path
D. To prevent client-side scripts (like JavaScript) from accessing the cookie, reducing the risk of data theft via Cross-Site Scripting (XSS)
Answer: Option D
Solution (By JKExamLibrary)
The 'HttpOnly' security flag prevents client-side scripts from reading cookie strings via properties like 'document.cookie', protecting session tokens from malicious script injection exploits.

This question belongs to: Computer Internet and Web Technologies

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Internet and Web Technologies Questions

Question #1 Report Error
Which layer of the TCP/IP network suite directly interacts with web client software applications such as Google Chrome or Mozilla Firefox?
A. Transport Layer
B. Application Layer
C. Physical Layer
D. Network Layer

Correct Answer: Option B


Explanation:
The Application Layer is the top layer of the TCP/IP model that houses protocols (like HTTP, FTP, SMTP) that client applications interface with directly.

This question belongs to: Computer Internet and Web Technologies
Question #2 Report Error
What is the function of a VPN in the context of web browsing?
A. To cache web pages
B. To speed up browsing
C. To provide a secure, encrypted tunnel for internet traffic
D. To block all ads

Correct Answer: Option C


Explanation:
A VPN (Virtual Private Network) creates a secure, encrypted connection over the internet, protecting privacy and data from interception.

This question belongs to: Computer Internet and Web Technologies
Question #3 Report Error
Which of the following parameters represents an accurate description of the web development concept called 'Single Sign-On' (SSO)?
A. A specialized local browser link designed to clear cache blocks
B. An authentication mechanism that allows a user to log in once and gain secure access to multiple independent web applications or services without re-entering credentials
C. A physical computer motherboard processing chip specification
D. An unlinked text documentation archive stored on local devices

Correct Answer: Option B


Explanation:
SSO authenticates a user once across a centralized identity provider, passing secure tokens to connected web systems to streamline access and eliminate login fatigue.

This question belongs to: Computer Internet and Web Technologies