Instead of the user clicking on a map to enter their location as part of a search, it is possible for the browser to send the users preferred coordinates automatically. For instance, a Web agent in a laptop with a GPS card, or built into a cellphone or PDA, could send the current position as determined by a navigation system.
So, in order to find the closest gas station or Mexican restaurant, the user merely has to enter "gas station", etc., into the search box and click "Find".
For this to work, the browser must be modified to send an "HTTP Extension Header" containing the geographic position. This might, for instance, be placed in a certain file as defined by the browser preferences, and re-read each time a request is generated.
The method used in this demonstration is very crude - the filename /var/lynx/extra-headers.dat is hard coded into the program. If it exists, its contents will be sent as extra HTTP headers in each request. Typical data might be
Geo.Position: 49;-123 Geo.Region: CA-BC
This demo reads two files to generate geo.position and geo.region headers:
/usr/share/locale/geo.position and /usr/share/locale/geo.region
locale/geo.position should contain only the position string, e.g. 49;-123
locale/geo.region should contain only the region string, e.g. CA-BC
The demonstration search engine GeoSearch will use these headers if sent, or a cookie-based user position. The cookie-based preference scheme requires separate cookie creation for each website using geographic searching, while the HTTP header based scheme described here requires no explicit registration, and may be updated in real-time.