Which of the following is a method to secure cookies against cross-site scripting attacks? MCQ with Answer and Explanation

Which of the following is a method to secure cookies against cross-site scripting attacks?
A. HttpOnly flag
B. Secure flag
C. SameSite flag
D. All of the above
Answer: Option D
Solution (By JKExamLibrary)
HttpOnly prevents client-side script access, Secure ensures transmission over HTTPS, and SameSite restricts cross-site requests, all enhancing cookie security.

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 of the following is an example of a web protocol for pushing notifications from server to client?
A. All of the above
B. Web Push API
C. WebSocket
D. Server-Sent Events

Correct Answer: Option A


Explanation:
Web Push API, SSE, and WebSocket all enable server-to-client notifications, though they differ in implementation and use cases.

This question belongs to: Computer Internet and Web Technologies
Question #2 Report Error
What does the term 'REST' stand for in web services?
A. Resource State Transfer
B. Representational State Transfer
C. Remote Execution State Transfer
D. Reliable Service Transfer

Correct Answer: Option B


Explanation:
REST (Representational State Transfer) is an architectural style for designing networked applications, using HTTP methods for CRUD operations.

This question belongs to: Computer Internet and Web Technologies
Question #3 Report Error
Which of the following network parameters identifies an unencrypted network protocol configuration variant used to transfer files over port 21 without encryption?
A. SSH terminal shell access line
B. Standard FTP (File Transfer Protocol)
C. SFTP connection utility
D. HTTPS secure transfer layer

Correct Answer: Option B


Explanation:
Standard File Transfer Protocol (FTP) operates unencrypted across ports 20 and 21, transmitting authentication and data packets in plain text.

This question belongs to: Computer Internet and Web Technologies