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 8663357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:58:11+00:00 2026-06-12T16:58:11+00:00

I am writing a project thesis and have stumbled on an issue which might

  • 0

I am writing a project thesis and have stumbled on an issue which might set my entire project in doubt. So I just want to triple-confirm before I take any further actions.

I have a javascript file on URL1. The javascript code, for simplicity, retrieves information from URL2.

No matter how much I tried this wouldn’t work so I did a Google search and figured out that the same-origin policy might be the reason.

So I ask you again, is this impossible?

  • 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-12T16:58:12+00:00Added an answer on June 12, 2026 at 4:58 pm

    this is totally possible, but there are some restrictions to it;

    You can access information of URL2 from URL1, if URL2 provides a JSONP way. You’d generate a script tag that loads a js file (url2/information?id=123&callback=mycallback) in which the JSON is put into the specified function (in this case mycallback). The script on URL2 would look like this;

    mycallback({"json":"information"});
    

    Thus, URL1 needs a mycallback function defined and will get the information from URL2

    A different approach would be to utilize XMLHttpRequest Level2 which can go cross-domain.

    Another would be to communicate over onmessage/postmessage and have URL2 iframed within the page of URL1. This goes Cross-Origin as well.

    There are other technics to make a hole in the same origin policy, like Hashs (but are very limited in comparison to the above technics)

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

Sidebar

Related Questions

I am writing a MVC3 project. Right now I have a table which has
I am writing a MVC3 project. Right now I have a table which has
I'm writing a project in mvc 3. I want to set an object in
I'm writing my master thesis, which deals with AOP in .NET, among other things,
I am writing a project on Google App Engine, within it I have a
Just now i'm writing a project, and i desided to write it with jquery
I am working on a project writing a GLSL fragment shader, and it just
I'm writing my degree project report using the article class and I want a
I am writing a project, which can read Japanese characters from file and do
I'm relatively new to PHP and have been writing a project using what I

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.