FeaturedIT topics

How to use the Save-Data request header in ASP.Net Core

HTTP headers contain data stored as name/value pairs that are passed between the server and the client. These headers are passed along with the request or the response. The Save-Data header is a “client hint” request header that is available in Chrome and Opera web browsers.

The Save-Data request header enables you to build applications that are lighter and faster for users who turn on a data-saving mode in their web browsers. If the data-saving mode is enabled, the web browser sends a HTTP request header named Save-Data with the value “on.” You can enable this extension in Chrome to enable Google servers to compress pages before they are rendered. It should be noted that you can also enable the data-saving mode in Android from the settings menu.

Save-Data is a great performance optimization trick that you can take advantage of to deliver faster, lighter web applications—often by replacing high-resolution images with low-res versions or omitting non-essential images altogether. This article presents a discussion of how we can work with the Save-Data request header in ASP.Net Core applications.

Create an ASP.Net Core web application project

First off, let’s create an ASP.Net Core project. If Visual Studio 2017 is up and running in your system, follow the steps given below to create a new ASP.Net Core web application project in Visual Studio.

Related Articles

Back to top button