These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

refresh IGB after jump

First post
Author
Eduardo'o
Ministry of War
Amarr Empire
#1 - 2012-01-10 19:33:28 UTC
Hi,

I know the IGB does not refresh automatically after a system jump.

But is there a way to do this through some fancy javascript? By comparing every 5 seconds the current IGB solarsystem variable with the solar system variable that was retrieved the moment the webpage was generated. When there is a difference, do a javascript page refresh so that the new system is used to compage the current IGB solar system variable with every 5 seconds.

Is this possible in any way?

Ed
CCP Atlas
C C P
C C P Alliance
#2 - 2012-01-10 21:18:38 UTC
Yes, that's just about how you do it, except that you must make an ajax call to your webserver and do the comparison there since the call will include the solarsystemID in the headers.
Astrid Stjerna
Sebiestor Tribe
#3 - 2012-01-10 21:44:33 UTC
CCP Atlas wrote:
Yes, that's just about how you do it, except that you must make an ajax call to your webserver and do the comparison there since the call will include the solarsystemID in the headers.


Refreshing one variable for one person is fine, but what happens when twenty thousand people make the same function call?

I can't get rid of my darn signature!  Oh, wait....

Callean Drevus
Perkone
Caldari State
#4 - 2012-01-10 21:53:34 UTC
Well, the server handles the request twenty thousand times.... Twenty thousand users simply require a bigger server than 10. This is a rather simple request though, so it might not be extremely heavy even with 20000 people doing it every 5 seconds.

What's heavy is reloading the page, but that hopefully doesn't happen all that much (flying from system to system takes about 30 seconds per system at least).

Developer/Creator of EVE Marketeer

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#5 - 2012-01-11 00:15:28 UTC
Would be nice to have those headers exposed via javascript, too. Though not easy, I guess.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Scrapyard Bob
EVE University
Ivy League
#6 - 2012-01-11 05:52:45 UTC
And I'm 90% sure that the DotLan maps have that functionality...

http://evemaps.dotlan.net/radar

Callean Drevus
Perkone
Caldari State
#7 - 2012-01-11 10:03:28 UTC
Steve Ronuken wrote:
Would be nice to have those headers exposed via javascript, too. Though not easy, I guess.

Indeed, and the market quickbar, while we're at it Blink it isn't easy to update them automatically without a page reload, but I'd be very happy to just have those in the CCPEVE object even once (or a function to ask for these kinds of things).

Developer/Creator of EVE Marketeer

Project 69
Aurora Coalition
Synergy of Support
#8 - 2012-01-11 10:34:14 UTC
in the good old days we had a "OnSessionChange" function...... (or something like that)...
I miss those and the "nearest location" and the "drag to IGB" function

but new is always better I've heard ;)
Risingson
#9 - 2012-01-11 15:05:56 UTC
Steve Ronuken wrote:
Would be nice to have those headers exposed via javascript, too. Though not easy, I guess.

yeah a session change should trigger a javascript event we could listen to in IGB. dont know about the technical side to implement something like that though. Eveeye has an IGB OOG sync feature aswell doing a server call to get headers every 15 seconds. even if that load is not too heavy its not cool.
Eduardo'o
Ministry of War
Amarr Empire
#10 - 2012-01-11 20:10:43 UTC
Thx guys,

Indeed, having the onsessionchange back would be awesome
John Crichton Jr
Eve Hit List
#11 - 2012-04-09 07:34:25 UTC
Meh, imo the current method is pretty simple.

Quote:
setInterval(function(){$.get("/users/"+user_id+"/reload");}, 10000)


Then just catch the refreshed headers from the get request.

If there is new data then simply display it.