A

Joe Attardi

Web API Cookbook cover

Web API Cookbook

Level Up Your JavaScript Applications

by Joe Attardi

Master modern web APIs.

Unlock the full potential of modern browsers with hands-on guidance through powerful web APIs.

About the Book

JavaScript gives web developers great power to create rich interactive browser experiences, and much of that power is provided by the browser itself. Modern web APIs enable web-based applications to come to life like never before, supporting actions that once required browser plug-ins. Some are still in an experimental stage, but many are ready for use today.

This hands-on cookbook explores the powerful APIs available in modern browsers and guides you through the specific tasks that they unlock. Because these features are web standards, there is comprehensive documentation available from trusted resources such as MDN Web Docs. The knowledge you'll gain is transferable across different companies and projects.

With this book, you'll:

  • Learn the breadth of functionality available in modern browser APIs
  • Explore future APIs that are still in an experimental stage
  • Discover newer elements, such as dialog that replaces the need for a third-party library
  • Build more powerful and interactive web applications using native APIs
  • Understand the permissions model used by the browser to unlock functionality such as geolocation and push notifications
Web API Cookbook covers a wide range of browser-based APIs and provides valuable examples for all skill levels. Plus, Joe's writing style and thoughtful explanations make the learning enjoyable. This is a must-read for web developers!
- Sarah Shook
Software developer/owner, Shook LLC
This book offered fresh insights and introduced me to APIs I never knew existed.
- Bret Little
Staff Software Engineer, Shopify

Contents

  1. Asynchronous APIs
    Explore fundamental asynchronous JavaScript concepts, including callback functions and Promises.
  2. Simple Persistence with the Web Storage API
    Store and retrieve data using persistent storage.
  3. URLs and Routing
    Work with the URL and History APIs.
  4. Network Requests
    Communicate with remote servers and APIs.
  5. IndexedDB
    A more sophisticated data store which can store collections of objects.
  6. Observing the DOM
    Listen for changes to DOM elements and their structure.
  7. Forms
    Enhance your forms with the FormData and Constraint Validation APIs.
  8. The Web Animations API
    Apply keyframe animations to elements programmatically.
  9. The Web Speech API
    Add voice synthesis and recognition to your apps.
  10. Working With Files
    Read and write file data.
  11. Internationalization
    Explore the internationalization APIs built in to the browser.
  12. Web Components
    Create custom HTML elements.
  13. UI Elements
    Use dialogs and other interactive elements.
  14. Device Integration
    Interact with sensors and services on your device.
  15. Measuring Performance
    Capture performance metrics.
  16. Working With the Console
    Learn about different ways to present information using the Console API.
  17. CSS
    Explore CSS related APIs.