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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:54:24+00:00 2026-06-11T10:54:24+00:00

I’m looking at Javascript widget that has to work under the following constraints: The

  • 0

I’m looking at Javascript widget that has to work under the following constraints:

  1. The widget makes a request to a 3rd party server along with a callback URL
  2. The 3rd party server pings the callback URL after an arbitrary time, which should trigger a method to run within the widget

This is how the widget has been implemented:

  1. Server A has been setup. The widget appends a GUID parameter to a static URL that points to Server A.
  2. The widget sends this URL (with the GUID parameter) to the 3rd party server.
  3. Server X simply listens for requests from the 3rd party server and stores the GUID parameter from each request in a database.
  4. The widget polls Server A every X secs to see if the 3rd party server sent a callback with its GUID.
  5. If server returns an OK response, the widget runs the required method.

Seems like a fairly sketchy implementation. Isn’t there a simpler way to do this?

I would like to explore:

a) Whether it’s possible to avoid polling the server from the widget repeatedly? Can a keep-alive connection be setup? Can the widget subscribe to a server event? I looked at the Server-sent events API which allows push notifications to be sent by the server to the browser. But this isn’t compatible with IE yet.

b) Whether it’s possible to avoid setting up a backend altogether? WebSockets come to mind but I’m hazy on the details and the compatibility issues would make them undesirable.

Thanks.

  • 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-11T10:54:25+00:00Added an answer on June 11, 2026 at 10:54 am

    Server messages and WebSockets alike are your two answers. Sadly, neither is ubiquitous, so you can’t use a vanilla implementation of either, and expect to have full support.

    There are a few solutions out there (several paid, unfortunately), which offer WebSocket functionality on both ends, with fallbacks to Flash or long-polling.

    Pusher is a library which immediately comes to mind.
    There are several implementations of Pusher for whatever the backend may be, and the client will default to websockets, but will revert to Flash’s data-transfer format if possible.
    They also have a REST API.

    It all comes down to who you’re looking to support.
    In the end, I don’t even know that you’d want to give IE6/7 users the full, real-time experience, even if you can…
    …because the workarounds (ie: constant polling) for the worst-case are also the slowest-performing, which the slowest browsers would then be stuck using.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

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.