I've developed a standalone XULRunner app that I'm using as a site-specific browser. The web application it accesses does filtering of browsers to know whether the browser being used is optimal. I'd like to add my XULRunner app to the list of optimal browsers. I figured that to do this, I'll need to know the HTTP header information that accompanies request sent by the XULRunner app. What information in the HTTP header can I use to identify my XULRunner app? Something like the Gecko Engine version, etc. I've been searching around, but no luck yet.
Asked
Active
Viewed 314 times
1 Answers
0
An application is usually identified by means of the User-Agent
header. You can see it on the client side by means of the window.navigator.userAgent
property, e.g. the header for Firefox 12 on Windows 7 is:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
The important part here is Gecko/...
(identifies a Gecko-based browser) and rv:...
(Gecko version). The Firefox/12.0
part should be replaced by something like MyApp/1.2.3
in your case (name and version number of your application).

Wladimir Palant
- 56,865
- 12
- 98
- 126
-
Thanks a lot, Palant. I'm try this out, and I'll let you know how it goes. Just a quick one: Anyway of telling the version of XULRunner used? – okello May 23 '12 at 09:40
-
Thanks a lot, Palant. `window.navigator.userAgent` returned the user-agent. All I then needed to do is include the agent signature in my optimal browsers list. – okello May 23 '12 at 09:51
-
XULRunner version and Gecko version are always the same. – Wladimir Palant May 23 '12 at 10:17