Which of the following is a type of web attack that injects malicious scripts into web pages? MCQ with Answer and Explanation

Which of the following is a type of web attack that injects malicious scripts into web pages?
A. Cross-Site Request Forgery (CSRF)
B. Cross-Site Scripting (XSS)
C. SQL Injection
D. Phishing
Answer: Option B
Solution (By JKSSB Mock Tests)
Cross-Site Scripting (XSS) is a vulnerability where attackers inject malicious scripts into otherwise benign websites, which are then executed in users' browsers.

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 function of the 'defer' attribute in a script tag?
A. To load the script after page load
B. To prevent script from running
C. To delay script execution until the page has parsed
D. To execute the script asynchronously

Correct Answer: Option C


Explanation:
The defer attribute tells the browser to continue parsing the HTML while the script downloads, and execute it after the document is parsed, in order.

This question belongs to: Computer Internet and Web Technologies
Question #2
What mechanism does a web browser implement to store layout stylesheets and image files from visited websites inside device storage to avoid re-downloading them on subsequent visits?
A. Altering localized device hardware MAC address registries
B. Static FTP file catalog adjustments
C. Browser Caching
D. Running outbound SMTP mail server delivery routines

Correct Answer: Option C


Explanation:
Browser caching saves static website assets (like logos, CSS files, and scripts) to the local hard drive, reducing page load times and saving bandwidth during repeat visits.

This question belongs to: Computer Internet and Web Technologies
Question #3
What is the function of the 'ping' tool in relation to a URL?
A. To check if the web server is reachable
B. To trace the network route
C. To test website speed
D. To resolve the domain to an IP

Correct Answer: Option A


Explanation:
Ping sends ICMP echo requests to the host to determine connectivity and round-trip time.

This question belongs to: Computer Internet and Web Technologies