The Beacon API is a lightweight and efficient way to log information from a web page back to a server. It is used for sending small amounts of data to a server without waiting for a response. Think of it like a postcard sent home when on vacation. You put a small amount of data on it, put it in the mailbox, and you don’t expect a response. In this article, Drew McLellan will help you find out how that can be used and what makes it so different from traditional Ajax techniques.
Read more…
Is it possible to use digital musical instruments as browser inputs? With the Web MIDI API, the answer is yes! The best part is, it’s fairly quick and easy to implement and even create a really fun project. In this article, Peter Anglea will cover the basics of MIDI and the Web MIDI API to see how simple it can be to create a web app that responds to musical input using JavaScript.
Read more…
Whenever we design a web application utilizing real-time data, we need to consider how we are going to deliver our data from the server to the client. The default answer usually is “WebSockets.” But is there a better way? Let’s compare three different methods: Long polling, WebSockets, and Server-Sent Events; to understand their real-world limitations. The answer might surprise you.
Read more…
GraphQL’s features are not a revolution, but what makes GraphQL powerful is that the level of polish, integration, and ease-of-use make it more than the sum of its parts. Many of the things GraphQL accomplishes can, with effort and discipline, be achieved using REST or RPC, but GraphQL brings state of the art APIs to the enormous number of projects that may not have the time, resources or tools to do this themselves. In this article, Eric Baer focuses almost entirely on why GraphQL exists and the problems it solves.
Read more…
Manually clicking through different browsers as they run your development code, either locally or remotely, is a quick way to validate that code. However, it’s not a solution for testing the full breadth of your site’s code base on the assortment of browsers and device types available to your customers. That’s where automated testing really comes into its own. In this article, Jason McConnell provides an overview of the concepts, technologies and coding techniques involved with running test scripts against browsers automatically using WebDriverJS on Windows 10 and Microsoft Edge.
Read more…
Rather than exploring features first, it is helpful to put them into context and to understand how they came to exist. In this series, Eric Baer wants to introduce you to GraphQL. By the end, you should understand what it is and also its origins, its drawbacks and the basics of how to work with it. Today, Eric will go over how and why we have arrived at GraphQL by looking at the lessons learned from the last 60 years of API development, from RPC to now.
Read more…
Intersection information is needed for many reasons, such as lazy loading of images. But there’s so much more. It’s time to get a better understanding and different perspectives on the Intersection Observer API. In this article, Denys Mishunov is going to go out of the scroll darkness and talk about the modern way of lazy-loading resources. Not just lazy-loading images, but loading any asset for that matter. And the technique he is going to talk about today is capable of much more than just lazy-loading assets. Ready?
Read more…
Everything you need to know about REST APIs, from start to finish. How and why to use REST APIs, how to deal with headers, error messages and API versions. In this article, Zell Liew will show you everything you need to know about REST APIs to be able to read API documentations and use them effectively. In addition, you will also learn how to authenticate your requests with the -u option, and what HTTP statuses mean. Let’s get started!
Read more…
Even when mobile pages are well designed, there’s a lot of information required when buying: Our contact information, shipping and billing addresses, shipping option and card details. If you’ve ever just given up sometimes, you’re in the majority. The abandonment rate on mobile can be as high as 84% or more! With the rise and rise of mobile browsing over recent years, this means the overall problem has been getting worse and worse. The W3C Working Group has been busy developing new standards to help make online payments much easier. In this article, Peter O’Shaughnessy provides you with the latest updates and explores the API with a basic example.
Read more…
With the current state of web apps, we can rely on various UI elements to interact with users. With the Web Speech API, we can develop rich web applications with natural user interactions and minimal visual interface, using voice commands. In this tutorial, Tomomi Imura will use the API to create an artificial intelligence (AI) voice chat interface in the browser. The app will listen to the user’s voice and reply with a synthetic voice. Because the Web Speech API is still experimental, the app works only in supported browsers. The features used for this article, both speech recognition and speech synthesis, are currently only in the Chromium-based browsers, including Chrome 25+ and Opera 27+, while Firefox, Edge and Safari support only speech synthesis at the moment.
Read more…