1

I am writing a web application for my company. The company has a server that I have to use and I can not change anything on the server side.

When I send an HTTP GET request I get a stream of XML as response, i.e. the HTTP connection remains opened until it is closed manually. When I test the request in my browser I immediately get the response which is updated automatically every time the data changes (and because it is a stream, the loading animation of the browser keeps running).

How can I handle the response in javascript? Is there any way I can get notified when the data changes? I have done research for available frameworks to handle this but without any luck.

3
  • You will need to set up an interval and Ajax the data and compare to previously gotten data Commented Apr 10, 2014 at 8:49
  • Is there no way to get notified when the data has updated rather than polling the data everytime? It is a stream, not a regular response. Commented Apr 10, 2014 at 9:10
  • You may want to use notifications, loot at this answer that may help you out dude ! Commented Apr 10, 2014 at 9:35

1 Answer 1

0

There is a SAX parser written in JavaScript which would be useful in an architecture such as:

  • Company Server
  • WebSocket stream
  • Sax.js

References

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.