Which of the following is a method to improve the security of a website by preventing attacks like XSS? MCQ with Answer and Explanation

Which of the following is a method to improve the security of a website by preventing attacks like XSS?
A. Output encoding
B. All of the above
C. Content Security Policy (CSP)
D. Input validation
Answer: Option B
Solution (By JKSSB Mock Tests)
Output encoding, input validation, and CSP are all effective defenses against XSS attacks.

Discuss this Question (0)

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

Practice More Internet and Web Technologies Questions

Question #1
What is the primary security benefit provided by an 'HTTPS' connection over standard unencrypted 'HTTP' communication?
A. It encrypts data in transit to prevent eavesdropping and data tampering by third parties.
B. It dramatically boosts physical data transmission speeds over fiber lines.
C. It completely prevents malware from downloading automatically to local hard drives.
D. It eliminates all forms of comment spam on web blogs.

Correct Answer: Option A


Explanation:
HTTPS ensures confidentiality and data integrity by encrypting the communication stream between a client and a web server using TLS/SSL.

This question belongs to: Computer Internet and Web Technologies
Question #2
What does a web browser perform when executing a 'DNS Lookup' operation?
A. It clears out localized hardware registry errors.
B. It establishes a secure tunnel path via proxy configurations.
C. It downloads heavy multimedia files to local cache blocks.
D. It queries DNS servers to resolve a domain name string into its underlying IP address.

Correct Answer: Option D


Explanation:
DNS resolution looks up human-readable text domain destinations to find their matching numerical IP addresses so network connections can be established.

This question belongs to: Computer Internet and Web Technologies
Question #3
Which protocol is utilized by network administrators to dynamically assign local IP addresses automatically to devices joining a network?
A. SMTP
B. DHCP
C. FTP
D. DNS

Correct Answer: Option B


Explanation:
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses and network configuration parameters to client devices dynamically.

This question belongs to: Computer Internet and Web Technologies