25.02.2013 Views

Peter Lubbers - Pro HTML 5 Programming

Pro HTML 5 Programming

Pro HTML 5 Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Download from Wow! eBook <br />

92<br />

CHAPTER 4 ■ USING THE <strong>HTML</strong>5 GEOLOCATION API<br />

Table 4-6. Browser support for <strong>HTML</strong>5 Geolocation<br />

Browser Details<br />

Chrome Supported in Google Chrome version 2 with Gears<br />

Firefox Supported in version 3.5 and greater<br />

Internet<br />

Explorer<br />

Supported via the Gears plugin<br />

Opera Planned support version 10, experimental support in nightly<br />

builds<br />

Safari Supported in version 4 for the iPhone<br />

Due to the varying levels of support, it is a good idea to first see whether <strong>HTML</strong>5 Geolocation is<br />

supported before you use the APIs. The section “Checking for Browser Support” later in this chapter will<br />

show you how you can programmatically check for browser support.<br />

Privacy<br />

The <strong>HTML</strong>5 Geolocation specification mandates that a mechanism is provided to protect the user's<br />

privacy. Furthermore, location information should not be made available unless the application’s users<br />

grant their express permission.<br />

This makes sense and addresses the “big brother” concerns users often raise about <strong>HTML</strong>5<br />

Geolocation applications. However, as you can see from some of the possible use cases for <strong>HTML</strong> 5<br />

Geolocation applications, there is usually an incentive for the user to share this information. For<br />

example, users might be OK with sharing their location if this could let them know about a rare 50%<br />

discount on a pair of running shoes that are ready to be picked up in a store located just a few blocks<br />

away from where they happen to be drinking coffee. Let’s take a closer look at the browser and device<br />

privacy architecture shown in Figure 4-1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!