spfx banner issue

Aniruddha Aditya 316 Reputation points


I have created an SPFx banner as attached. The issue is that I see multiple banners pops up as SharePoint site at times pulls from the history. When I do a refresh, then the single footer and banner appears.

I would like to know why the issue is and how to get it resolved.

Please refer my attached image.


A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,249 questions
{count} votes

Accepted answer
  1. Aniruddha Aditya 316 Reputation points

    @Amos Wu-MSFT Yes. This issue is resolved. by using a weired code as below
    if (DuplicateChecker == 1) {
    DuplicateChecker = 2; //This is to stop duplicate banner appearing when page loads from cache


3 additional answers

Sort by: Most helpful
  1. Aniruddha Aditya 316 Reputation points

    @Amos Wu-MSFT .

    I am using Chrome 88.0.4324.150 (Official Build) (64-bit) and IE also. This issue comes when SharePoint loads the page from the history/cache.


  2. Aniruddha Aditya 316 Reputation points

  3. Amos Wu-MSFT 4,051 Reputation points

    HTML code of the header has been printed. You could check the number of times the header HTML code is printed and whether the printed content is the same in the console window of the browser developer tool.
    I suggest you debug on the browser to see if there are logic errors in the code.

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.