goog.net.XhrManager.send() id

47 views
Skip to first unread message

John Munro

unread,
May 15, 2013, 5:47:09 PM5/15/13
to closure-lib...@googlegroups.com
What are you guys using for the id parameter of goog.net.XhrManager.send()?

For the short term I'm incrementing a number property on a parent class and converting it to a string, but eventually the number will overflow and in any case it doesn't need to be that unique - only unique among current requests.

Is there a standard solution or best practices for this?  I don't actually need the id for anything, since I'm not planning on aborting any requests.

Guido Tapia

unread,
May 15, 2013, 5:54:16 PM5/15/13
to closure-lib...@googlegroups.com
I use the uri + increment.  JS numbers are floating points so dont worry about overflows, even if they were integers you would never really overflow (well that depends on #requests per seconds and the number of centuries you keep the browser open for).
Reply all
Reply to author
Forward
0 new messages