What is the purpose of the 'same-origin policy' in web browsers? MCQ with Answer and Explanation

What is the purpose of the 'same-origin policy' in web browsers?
A. To ensure cookies are only sent to the same site
B. To prevent scripts from accessing data from different origins
C. To enforce HTTPS usage
D. To block pop-ups
Answer: Option B
Solution (By JKSSB Mock Tests)
The same-origin policy restricts how documents or scripts loaded from one origin can interact with resources from another origin, protecting against attacks like CSRF and data theft.

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 operational task of a 'Root Name Server' operating within the hierarchical Domain Name System infrastructure?
A. To direct DNS query lookups to the appropriate Top-Level Domain (TLD) nameservers based on the extension of the domain requested
B. To parse HTML structural page tags inside browser interfaces
C. To filter email spam items from corporate mail boxes
D. To monitor local physical network card connectivity metrics

Correct Answer: Option A


Explanation:
Root name servers are the first step in resolving human-readable domain names, directing inquiries to the appropriate Top-Level Domain (TLD) servers (like those for .com or .org).

This question belongs to: Computer Internet and Web Technologies
Question #2
Which of the following refers to a specific web software asset used to provide localized data charts, real-time stock prices, or news items directly embedded into a sidebar workspace?
A. SMTP Routing Tag
B. Robots Indexer
C. Web Widget
D. FTP Directory Link

Correct Answer: Option C


Explanation:
A web widget is a small, portable application snippet embedded within a web page to display real-time information or specific dynamic tools.

This question belongs to: Computer Internet and Web Technologies
Question #3
What is the purpose of the 'Alt' attribute in an image tag for accessibility?
A. To provide a textual description for screen readers
B. To define image dimensions
C. To style the image
D. To display a tooltip

Correct Answer: Option A


Explanation:
Alt text is essential for accessibility, providing a description of the image for users who cannot see it.

This question belongs to: Computer Internet and Web Technologies