Jump to content


This topic is now archived and is closed to further replies.


how to retrieve runtime values from another process/page ?

Recommended Posts

OK , it's a little bit tricky , however I can't get it done  ??? ...

There is a main page HTML/JS file that continuesly picks random numbers and print then on screen.

there are 2 or more 'viewers' that can hook to a certain URL and observe the main page and its changing random numbers at real time - each viewers see *exactly* the same view.

I know how to implement this using files (saving each random number into a temp file , each one of the viewers fetch this file content and prints it onscreen) , yet : this has few disadvantages :

1. slow (I/O).
2. the viewers are not really *exactly* tuned to the main page changing numbers - there is some kind of latency in this scenario.
3. the viewers don't see 100% of the main page information this way.

I think that AJAX might be handy here , yet I need a guiding hand here ,

I would start from the following question :

How can I get realtime dynamic values (which keeps changing each second) from a main page using other JS files (using some kind of socket or open connection I guess) ?


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.