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.
 

Forcing IGB Header update

Author
Kielen Dres
Sefem Ortus
O.P.A
#1 - 2014-06-04 16:40:59 UTC
Does anyone have a useful way to force the IGB to get new headers WITHOUT a full page refresh?

So far I've tried just making a new XMLHttpRequest but it seems the eve related headers only come through on the initial page load.

If there is so way to access them later, or to refresh them independently of the page contents, please let me know. There are a few apps out there that seem to do this successfully so I'm sure it can be done.
Dragonaire
Here there be Dragons
#2 - 2014-06-04 17:01:35 UTC
Only time that I know of that any browser sends headers is on page request that just part of the HTTP process. The same is true with webserver it's only on sends that it can do headers which includes XMLHttpRequests. IGB does one thing that normal browser doesn't in that on ingame session changes (dock, undock, jump, etc) it re-requests the current page with the updated headers. I believe you can also send header as part of your XMLHttpRequest as well but you have to do it yourself it's not done for you in any way like main page requests. Hope that gives you some ideas how to do it.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Myopic Thyne
Accounts Payable.
#3 - 2014-06-04 17:21:10 UTC
Kielen Dres wrote:
Does anyone have a useful way to force the IGB to get new headers WITHOUT a full page refresh?

So far I've tried just making a new XMLHttpRequest but it seems the eve related headers only come through on the initial page load.

If there is so way to access them later, or to refresh them independently of the page contents, please let me know. There are a few apps out there that seem to do this successfully so I'm sure it can be done.


You should be getting a new set of headers with your XHR; not sure why you wouldn't, double check to make sure you're not somehow discarding them along the way? More details/code samples would help diagnose this more perhaps.
Kielen Dres
Sefem Ortus
O.P.A
#4 - 2014-06-04 18:07:12 UTC
Dragonaire wrote:
on ingame session changes (dock, undock, jump, etc) it re-requests the current page with the updated headers


this is the part that my code isn't dealing with (and I didn't know this before). I'm using a library to read the headers, and I can see that in the page source the headers have been updated after a jump, but my library wont re-read them, I guess it expects them to be the same.

Thanks for the lead, I'll keep searching.
Bloemkoolsaus
Deep Core Mining Inc.
Caldari State
#5 - 2014-06-05 09:18:19 UTC  |  Edited by: Bloemkoolsaus
I use ajax requests (XMLHttpRequest) to get updated headers when people jumped/docked/whatever.
Make sure the requested URL of you ajax request is also trusted by the IGB.
Kielen Dres
Sefem Ortus
O.P.A
#6 - 2014-06-07 10:34:57 UTC
Bloemkoolsaus wrote:
I use ajax requests (XMLHttpRequest) to get updated headers when people jumped/docked/whatever.
Make sure the requested URL of you ajax request is also trusted by the IGB.


So you just make a new request to a completely different URL and read those headers? That seems like a good way to go. I'll try that.