This is useful for example for gathering analytics data about where your web site users are coming from. The HTTP Referer header is a (misspelled!) header that allows a target page to know what source page the user is coming from (for example, by clicking a link on that page). Using fetch(), you can now control the HTTP request referrer and referrer policy. We have recently implemented a few new additions to the Fetch API, and in this post I will give an overview of them and include examples of how they can help you develop your web applications. If you’re not familiar with the Fetch API, it would be a nice idea to read about it before proceeding. The WHATWG Fetch API provides a modern way to fetch network resources and gives you fine grained control over the details of the request and response. Around a year ago, we wrote about the new fetch() API.
0 Comments
Leave a Reply. |