Summary

In this chapter we created a weather widget that can be placed on any page. We made Ajax requests to get static XML and JSON data from the server. We learned how to find the user's location using the Geolocation API, and used that to call a web service to get localized weather data.

We covered the following concepts in this chapter:

  • How to read XML and JSON files from the server using Ajax
  • How to extract data from XML returned from server calls using jQuery
  • How to get the user's current position anywhere in the world using the HTML5 Geolocation API
  • How to interact with web services asynchronously using Ajax
  • Using JSONP to get around the security restrictions of cross site scripting
  • How to get the weather report for a user's current location using ...

Get HTML5 Web Application Development By Example Beginner's guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.