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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:43:54+00:00 2026-05-19T21:43:54+00:00

I am creating a JavaScript widget which gets around 4-6KB of data from a

  • 0

I am creating a JavaScript widget which gets around 4-6KB of data from a WCF service hosted by me and uses canvas tag(HTML5) to draw some charts. I want anybody to be able to embed this widget in their websites by copy pasting some html and JavaScript shared by me.

Now the problem : Same origin policy, it doesn’t allow any XHR request from the host domain of the widget to the WCF service on my domain, which means anyone using the widget cannot get the data from my WCF service(every request will get around 4-6kb of data in response).

I have gone through the previous discussions on this site and found the following possible solutions:

  1. JSONP (can be used with my WCF service)
  2. Hidden Iframes (not possible as i do not have control over both the domains)
  3. window.postMessage (not sure if JavaScript libraries can make it work in old browsers i.e. IE6)
  4. Cross-Origin Resource Sharing (CORS) (not possible as i want to be able to sport old browsers i.e. IE6)
  5. The Reverse Proxy method (not possible as i do not have control over server of the users website)
  6. easyXDM (can be a possible solution but need to explore how to use it with my WCF service)

Firstly I would like to confirm with you guys that the brief analysis done by me of the different approaches possible is correct and i am not missing out on any great solution that anyone is using and if my analysis is correct i would like to discuss the pros and cons of these approaches.

Secondly I know that Facebook, Twitter, Google all of them share their apps (exactly the way I want to share) and have overcome this problem in order to do so, Can anybody point me in the direction where I could find more about how they have solved this problem.

  • 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-05-19T21:43:54+00:00Added an answer on May 19, 2026 at 9:43 pm

    It’s something you need to judge based on

    • How large it’s acceptable for your widget to be, including libraries.
    • How frequently you’ll need to poll the service, or whether it’s a one time event.
    • How important full browser compatibility is to you.

    For the specific use case you describe, I would recommend JSONP. It would keep the widget very small, is a good cross browser solution and can handle the modest data requirements.

    Google etc use “comet” type solutions, in which a socket like stream is persisted between client and server. This shouldn’t be used for widgets as it would hog browser resources.

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

Sidebar

Related Questions

I have a JavaScript widget which communicates with my Rails app by creating tags
I'm creating a javascript 2D array from an XML file which I then manipulate
I have a JavaScript widget which provides standard extension points. One of them is
I'm creating new select boxes from a javascript function, on a div click event.
I'm programmatically creating javascript files from a .NET web app and would like to
I have created HTML TABLE from JSON data of PHP using JQuery. After creating
I'm creating a javascript widget so third partys (web designers) can post a link
I'm creating a javascript widget that resizes neighbouring divs, to reveal more of the
While creating JavaScript with ASP.NET MVC I noticed several scope warnings and realized that
I am creating a Javascript script to use with Indesign Server (CS3). Trying to

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.