Fixing "unload listener"

Hi, trying to eliminate an issue with Google Search Console issue to get “bfcache” to work.

I’m told, that my site “Registers an UNLOAD listener”. And that I should use "pagehide or visibilitychange " event instead. I need someone with a much higher pay grade than I to correct this.

I suspect that using “MegaMenu” Navigation Bar is causing this. At the moment I have it set to trigger on “hover”. When it is set to “on click”, I still have this unload listener.

Thought about adding code to the Body: Not sure what myFunction would be exactly…

Any help would be appreciated. (website is CustomDrains.com) I’m using RWClassic, Foundry 2, Stacks 5 for the most part.

Thanx,
Pearson

That is a part of the base javascript that Realmac included in the theme API. It really isn’t causing your site any problems.