Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8234203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:24:00+00:00 2026-06-07T18:24:00+00:00

Can someone help me to better understand the Same Origin Policy. I’ve seen several

  • 0

Can someone help me to better understand the Same Origin Policy. I’ve seen several websites describing it but I’m looking for an explanation much more simple, how would you describe it to a kid?

This link seems to do the best job that I’ve found. Can anyone expand? Can someone explain why this policy exists?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:24:01+00:00Added an answer on June 7, 2026 at 6:24 pm

    Same-origin policy is needed to prevent CSRF. Imagine this scenario:

    1. Bank manager Joe Fatcat has an account on his bank’s administrative backend. This account lets him access confidential account info for anyone who banks at TBtF Bank. He can even reset someone’s pin number, transfer funds, change account ownership, etc.
    2. Now, TBtF Bank lays off Jack the IT Guy. Now he’s Jack the Digruntled Ex-IT-Guy, and he wants to take revenge on his former employer. Jack doesn’t have access to the bank’s administrative backend, but he knows Joe does.
    3. So Jack sends his boss an email with a link to a page Jack created. On the page, there’s some JavaScript like:

    var xhr = new XMLHttpRequest(),
        data = "from="+victimAccount
               + "&to="+jacksAccount
               + "&amt=a+gazillion+dollars";
    xhr.open("POST", "http://tbtfbank.tld/accounts/wiretransfer.aspx", true);
    xhr.send(data);
    
    1. The next day, Joe arrives at his office and logs into his administrative account as he always does and leaves the tab open in the background.
    2. Joe sees an email containing links to pictures of Natalie Portman covered in hot grits. So naturally he clicks on it, opening the malicious webpage.
    3. The browser runs the JavaScript on the page and makes an AJAX POST request to TBtF Bank’s administrative backend site. Because Joe is already logged into the site and has an active session, the bank application accepts the command and wires a gazillion dollars to Jack’s offshore bank account.

    And Jack could have just as easily used the same technique to harvest thousands of account numbers and pins or any other information Joe the bank manager has access to via his account.

    Luckily, the same-origin policy protects us from these types of attacks most of the time, since Jack’s malicious page is hosted on a different domain from the bank application, it’s not allowed to make XHRs to the bank application. Though the malicious page could still contain an image that makes a GET request to the bank application, so it’s important that actions with side effects are not initiated via GET requests and that applications check the referrer header of requests they receive and take advantage of anti-CSRF tokens.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to better understand CSS. Can someone help me out with this. I
Can someone help me understand JSONP a little better? I have a json file
Can someone help me understand how to write this case statement properly its not
Can someone help me understand what SendGrid actually adds to an application architecture? Is
Can someone help me understand how best to model a composition relationship? If for
Can someone help me improve on this? There has to be a better way.
Can someone help me achieve multiple zend pagination in a view using ajax. I
Can someone help by showing me how to sort a LINQ expression. I have
Can someone help me with creating functions for the following processes? I want to
Can someone help me find the error when I tried to display the list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.