Search code examples
browsercometg-wan

comet.c cannot work with more than one page opened in browser


It works well when comet.c is opened in different browser simultaneously, one page per browser.
When I opened two pages of comet.c in a browser, no matter firefox or chrome, only the first page received and displayed data.
The second page were hanged until the first page was closed.
In the user's point of view, it is abnormal.
Who can tell what's wrong, browser or push_list_add() or the comet.js?
All pages requested freq. of one update per second.


Solution

  • [solved]
    In client side, add a timestamp at the end of the url in the form action.
    var url = "/?comet.c&feed=livestock&delay="+escape(delay)+"&"+(new Date().getTime());
    Done.