Monitor and improve your web app’s load performance

Today, large web applications are often assembled from many independent pieces, which all load their own data and resources. When all these pieces compete for the same network connection, congestion can build up and the user experience can suffer.

Illustration showing multiple pieces of a webapp, 3rd-party content, images, analytics, data, etc. all going through a single Network pipe, and, on the other side, a webpage with a part of it still loading.

To address this problem, we’re excited to introduce a new feature which web developers can start testing in Microsoft Edge today: Network Efficiency Guardrails.

If you’re a web developer, improving the load performance of your app starts with knowing what to focus on first. However, when your web app embeds a mix of first-party and third-party content from different sources, optimizing performance depends on each of these pieces—not just on what you built. That’s why identifying the resources that need to be optimized to improve your app’s load time is crucial, and that’s exactly what the Network Efficiency Guardrails feature does.

So, if you’re working on an app that embeds content, read on to learn more about Network Efficiency Guardrails and start using them.

Detecting bad resource-loading patterns

Based on our own experience working with large web-based applications, we know that there are certain resource-loading patterns which have a disproportionate impact on performance. For example:

  • Very large images
  • Uncompressed resources
  • Large data: URLs

With the Network Efficiency Guardrails feature, you can ask the browser to monitor your app’s network resource usage. Once network monitoring starts, the browser automatically identifies inefficient resource-loading patterns and reports them to you. You can then use this information to optimize your app for all your users.

App loads resources, then violations are reported, then the developer optimizes their site, then the app loads faster.

In practice, you first opt into the feature by setting a Document Policy. Once you’ve done that, the offending loading patterns which the browser detects are reported as policy violations through the Reporting API, a web platform mechanism that lets you send structured reports back to your server when something notable happens at runtime.

What gets reported

Currently, when you opt into the Network Efficiency Guardrails feature, Microsoft Edge will use the following criteria to identify policy violations:

  • Text-based resources that are not HTTP-compressed.
  • Images larger than 200 kB.
  • data: URLs larger than 100 kB.

These are our initial criteria, and we believe they are effective at flagging resource usage patterns that are atypical for well‑performing apps.

We chose these criteria based on aggregate, real‑world data, established industry best practices, and Web Almanac findings. To learn more about how these values were chosen, you can read about it in our feature explainer document. We expect to make changes to these values as we continue to gather more feedback and data.

Try Network Efficiency Guardrails today

The feature is available in Microsoft Edge, starting with version 146. To try it, you’ll first need to enable it:

  1. In Edge, go to edge://flags.
  2. Type “Experimental Web Platform features” in the Search flags text box at the top.
  3. Under the Experimental Web Platform features section, select Enabled in the dropdown menu.
  4. Restart Edge.

Enable the document policy on your site

Next, opt into the feature by enabling the document policy on your site, which you can do in either of these two ways:

  • Set the document policy by sending the following HTTP response headers from your server:

    Document-Policy:network-efficiency-guardrails; report-to=neg-endpoint
    Reporting-Endpoints: neg-endpoint="/neg-reporting/"

    The report-to endpoint name and value are not important yet. They’re only required so you can start seeing reports, but you don’t need to have the server endpoint running yet.

  • Or set the above response headers by creating a local override in DevTools instead. To learn how to do this, see Override HTTP response headers.

    This can be helpful to quickly get started since you don’t have to modify your server code.

View the reported violations

Now that you have everything set up, you can use your app as normal, and the browser will start reporting problematic network usage patterns to you. You can view the reported violations either in DevTools, or on your server.

Using DevTools for this is a simple way to get started. As violations get detected, they’ll appear in the Console tool as error messages:

The Console tool in Microsoft Edge DevTools, showing a reported violation message saying: Document policy violation: resource compression is required.

And you can also see them in the Application tool, under the Reporting API section, where you can find more details about each report:

The Application tool in Microsoft Edge DevTools, showing the Reporting API data, which contains one report about a resource that lacks compression. The additional data provides the link to the source file which lacks compression.

Viewing the reports in DevTools is a great way to get started. However, if you want to use Network Efficiency Guardrails in production, and receive real reports from your users’ devices, you’ll also need to configure a reporting endpoint on your server.

Configure a reporting server endpoint

To collect reports in production, use the report-to field in the Document-Policy header, giving it the name of your choosing. And then specify the value for this server endpoint in Reporting-Endpoints:

Document-Policy: network-efficiency-guardrails; report-to=neg-endpoint
Reporting-Endpoints: neg-endpoint="/neg-reporting/"

Now, configure the /neg-reporting/ endpoint on your server and make sure it can receive the reports, as well as accept preflight requests if you’re using a cross-origin endpoint.

To learn more, read the Reporting API documentation at MDN, and our feature explainer.

View reports client-side

You can also retrieve violation reports on the client with JavaScript code. The reports are exposed to the document where they got created, through the Reporting client-side API.

Use the ReportingObserver interface to access these reports as they are raised, and look for reports that have ReportBody.featureId === "network-efficiency-guardrails".

Let us know what you think

The Network Efficiency Guardrails feature is in its early stages of development, and we’d love you to try it and share your feedback with us.

Learning about your app’s specific network usage patterns can help us design the right API for you.

We’re actively exploring the following open questions, so now is a great opportunity to try the feature and help us improve it:

  • Fine-tuning existing guardrails: help us better detect the network usage patterns based on your data and feedback.
  • Adding new guardrails: are there additional patterns that we should be considering?
  • Cross-frame reporting: how should a parent frame monitor a child frame? Should bidirectional monitoring be possible? How should guardrails be enforced on embedded frames?

Checkout out the Network Efficiency Guardrails explainer and let us know your feedback by opening a new issue.

Source link

Visited 1 times, 1 visit(s) today

Related Article

Nvidia’s trillion-dollar run puts pressure on the bulls

BEIJING, CHINA – MAY 14: Nvidia CEO Jensen Huang (C) gestures as he prepares to depart following a welcome ceremony at the Great Hall of the People on May 14, 2026 in Beijing, China. President Trump is meeting with President Xi Jinping in Beijing to address the Iran conflict, trade imbalances, and the Taiwan situation

Permutations in Europe: What’s still at stake in final weeks of season?

There’s still plenty to play for across Europe as we head into the final matches of the club season. Here are all the title races, Champions League fights, and relegation battles left to be decided in the top leagues this month. This story will be updated until the end of the campaign. 👉 Jump to:EPL

Brewing a Better Half-Gallon Batch

Today I finally ran an experiment I’ve wanted to try for a long time. If you’re a professional barista—or you run a busy café—this may save you some time. Most coffee shops use 1–1.5 gallon batch brewers (Bunn, Curtis, Fetco, etc.). When I opened Short Sleeves Coffee, I intentionally avoided brewing full 1-gallon batches. I

5 Frozen Breakfasts Chefs Say Keep You Full All Morning

Chef-approved frozen breakfasts with more protein and better ingredients. Eating a healthy breakfast every morning is a great way to start the day, but most people don’t have time to cook. Whether you’re rushing out the door in the morning for work, taking the kids to school or both, there’s usually not much time in

CA scales back plan to ban student use of cell phones

By Carolyn Jones, CalMatters This story was originally published by CalMatters. Sign up for their newsletters. Until last month, California was poised to join nearly a dozen other states that ban cell phones in K-12 schools. But under pressure from school boards and administrators, lawmakers scaled back a bill that would have required such a

BulkQuant Launches AI Trading Bot for Crypto, Forex, and Stock Markets

BulkQuant Launches AI Trading Bot for Crypto, Forex, and Stock Markets

London, United Kingdom, May 15, 2026 (GLOBE NEWSWIRE) — BulkQuant has officially launched its AI trading bot platform designed for crypto, forex, and stock market traders seeking a simpler way to automate trading strategies across multiple financial markets. The platform combines AI-powered quantitative analysis, automated trade execution, portfolio monitoring, and adaptive risk management into a

IMF lauds resilient Hong Kong economy but warns of risks linked to Middle East war

IMF lauds resilient Hong Kong economy but warns of risks linked to Middle East war

The International Monetary Fund (IMF) has lauded the resilience of Hong Kong’s economy, noting a sustained recovery despite economic activity having yet to return to pre-Covid levels, while warning of downside risks stemming from escalating geopolitical tensions. It also urged Hong Kong to pursue medium-term financial reforms, including the introduction of a goods and services

Smithsonian Presidents Exhibit Reopens With Low-Key Trump Impeachment Mention

For the past year, the Smithsonian Institution has found itself in the awkward position of telling the nation’s story while being supported in part by a government that wants to narrow how that story is told. In December, the White House threatened to revoke funding to the institution if it did not hand over a

Marvel’s Daredevil Follow-up Is Already Dominating on Streaming

A follow-up to Daredevil: Born Again Season 2 on Disney+ has become a massive streaming success within days of its launch. The Punisher: One Last Kill has quickly climbed to the top of multiple charts, beating out other titles on the platform. The MCU television special follows the gun-toting vigilante, who finds himself targeted by

Is Now a Bad Time to Invest?

The market has been on a roll lately, with the S&P 500 (SNPINDEX: ^GSPC) setting new highs throughout May. If you think you missed your opportunity when the market bottomed in late March, don’t fret. The market hitting new all-time highs is not particularly rare and should not change your investment strategy. And if you

6 bids for Hong Kong land sale signal renewed confidence despite market caution

6 bids for Hong Kong land sale signal renewed confidence despite market caution

The Hong Kong government’s first land sale in the current financial year has drawn six bids, according to the Development Bureau, including those from the city’s largest developers, suggesting a more confident outlook for the residential property market. At the close of tender for Tung Chung Town Lot No 54 at Area 106A on Friday

Each Premier League team reranked: Man City rise; Chelsea, Liverpool collapse

Ryan O’Hanlon Close Ryan O’Hanlon ESPN.com writer Ryan O’Hanlon is a staff writer for ESPN.com. He’s also the author of “Net Gains: Inside the Beautiful Game’s Analytics Revolution.”  and  Bill Connelly Close Bill Connelly ESPN Staff Writer Bill Connelly is a writer for ESPN. He covers college football, soccer and tennis. He has been at

Trump departs China after two-day summit

Trump departs China after two-day summit

IE 11 is not supported. For an optimal experience visit our site on another browser. Trump Wraps China Summit With Xi Jinping: What Are the Results? 05:41 Xi gives Trump rare tour of secret garden at heart of Chinese government 01:04 Now Playing Trump departs China after two-day summit 01:01 UP NEXT Special Report: Trump

Carol Chow was facing a bankruptcy petition by five people over unspecified debts at the time of her death. Photo: Dickson Lee

Embattled Hong Kong developer sued for HK$130 million, days after founder’s death

A Hong Kong property developer has been sued for HK$130 million (US$16.6 million) over allegedly breaching guarantor obligations in two bond subscription agreements, becoming the latest lawsuit to implicate the embattled company and following its founder’s sudden death earlier this week. Lofter Group, known for its urban renewal projects across the city’s core districts, and

Trump’s China visit left chip export issue unresolved

This report is from this week’s The Tech Download newsletter. Like what you see? You can subscribe here. One look at the roster of U.S. execs that cozied up to U.S. President Donald Trump on the 20+ hours flight from Alaska to China on Wednesday and you get a sense of the American delegation’s key focus

Why the Cerebras IPO matters for the AI race with China

Why the Cerebras IPO matters for the AI race with China

Cerebras, an AI chipmaker, saw its shares nearly double on Nasdaq, closing up 70% with a $95B market cap. Cerebras’s powerful chips are key in the US-China AI tech race. Chris Buskirk, co-founder and chief investment officer of 1789 Capital, a key Cerebras investor, says the company’s IPO is geopolitically significant. On Thursday, shares of

Fitbit Air vs Whoop Strap Comparison: Price, Features and AI

The Google Fitbit Air is very much the talk of the fitness tracking town right now, not only because it’s the first new Fitbit device that we’ve had in years, but it’s also one of the first big brands to go head-to-head with the established Whoop Strap (if you don’t count the Polar Loop and

0
Would love your thoughts, please comment.x
()
x