What is the purpose of the 'XMLHttpRequest' object in JavaScript? MCQ with Answer and Explanation

What is the purpose of the 'XMLHttpRequest' object in JavaScript?
A. To handle events
B. To send and receive data from a server asynchronously
C. To parse XML documents
D. To style web pages
Answer: Option B
Solution (By JKExamLibrary)
XMLHttpRequest is an API in JavaScript that allows web pages to make HTTP requests to servers asynchronously, enabling AJAX.

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
What is the purpose of the 'WebP' image format?
A. To replace JPEG
B. To provide superior compression and quality for web images
C. All of the above
D. To support transparency and animation

Correct Answer: Option C


Explanation:
WebP is a modern image format that offers better compression than JPEG and PNG, with support for transparency and animation.

This question belongs to: Computer Internet and Web Technologies
Question #2 Report Error
What is the term given to an attack that floods a target web server with a massive volume of dummy traffic from thousands of infected computers simultaneously to take it offline?
A. Distributed Denial of Service (DDoS)
B. SQL Injection
C. Man-in-the-Middle (MitM)
D. Cross-Site Scripting (XSS)

Correct Answer: Option A


Explanation:
A DDoS attack uses botnets (networks of compromised machines) to overwhelm target servers with traffic, causing them to slow down or crash completely.

This question belongs to: Computer Internet and Web Technologies
Question #3 Report Error
Which of the following is a valid scheme in a URL?
A. http
B. All of the above
C. ftp
D. https

Correct Answer: Option B


Explanation:
http, https, and ftp are all valid URL schemes (protocols).

This question belongs to: Computer Internet and Web Technologies