SharePoint / SharePoint/sp-dev-docs

With an Event Listener for navigatedEvent - Network tab thinks all requests are being made by my code

Open
#10,232 4 comments 0 reactions 1 assignee View on GitHub

@Amey-MSFT is already working on this.

Since May 6, 2025.

area:spfx Needs: Author Feedback type:bug-confirmed
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

Latest SPFx build

Describe the bug / error

In my Application Customiser I am using the navigatedEvent event listener in order to enable my customiser to fire on page navigation events which do not cause a full page reload.

this.context.application.navigatedEvent.add(this, async () => { /* customiser code goes here */ });
However, when I am inspecting the Network tab in DevTools it APPEARS as though my app customiser is causing dozens of requests.

On inspection of these requests, they are actually being made by SharePoint Online itself - and for some reason my app customiser is being references as the "Source"

This is a particular issue for clients who are suggesting that my app customizer is the cause of performance problems on their site.

An example screenshot of the network tab is shown below:
Many of these requests are "out of the box" SharePoint async page requests - for things like page tracking, logging activity, and various notification checks being made by the page.

Note - yes, I know the name of the JS file is "webpart" but trust me, this is actually an app customiser. Don't ask!

Image

Steps to reproduce
  1. Create a new SPFx Application Customiser
  2. Use the following snippet in your onInit() method:
    this.context.application.navigatedEvent.add(this, async () => { /* customiser code goes here */ });
  3. Deploy your package and check the Network Tab in Dev Tools
Expected behavior

When using the navigatedEvent event listener in my SPFx application, only requests made by my own code are referred to in Dev Tools as being requested by my code.

My code should not be listed as the "source" for out of the box SharePoint requests.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.