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. Secure flag
B. HttpOnly flag
C. SameSite flag
D. All of the above
Answer: Option D
Solution (By JKSSB Mock Tests)
HttpOnly prevents client-side script access, Secure ensures transmission over HTTPS, and SameSite restricts cross-site requests, all enhancing cookie security.

Discuss this Question (0)

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

Practice More Internet and Web Technologies Questions

Question #1
Which of the following files contains structured, plain text settings used by the Apache web server to configure localized directory permissions and redirect behaviors?
A. robots.txt
B. .htaccess
C. index.php
D. sitemap.xml

Correct Answer: Option B


Explanation:
The .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers to manage access controls and URL rewrites.

This question belongs to: Computer Internet and Web Technologies
Question #2
What is the function of an encryption certificate standard like SSL/TLS when integrated into e-commerce web channels?
A. To automatically build clean layout formatting patterns
B. To establish cryptographic authentication and data scrambling to secure monetary transactions and logins
C. To track site page view metadata collections
D. To accelerate processing speeds of graphic vector files

Correct Answer: Option B


Explanation:
SSL/TLS certificates authenticate web server identities and encrypt data streams, preventing hackers from reading sensitive credit card or login transmissions.

This question belongs to: Computer Internet and Web Technologies
Question #3
What does the acronym 'API' stand for?
A. Advanced Programming Interface
B. Automated Program Interface
C. Application Programming Interface
D. Application Program Interface

Correct Answer: Option C


Explanation:
API stands for Application Programming Interface, a set of rules that allows software applications to communicate with each other.

This question belongs to: Computer Internet and Web Technologies