• Resolved wordpresshat

    (@wordpresshat)


    I get this when I run GTMetrix that I have Lifter LMS on:
    The unload event does not fire reliably and listening for it can prevent browser optimizations like the Back-Forward Cache. Use pagehide or visibilitychange events instead. For this file: /wp-content/plugins/lifterlms/assets/js/llms.min.js?ver=6.10.1

    Anyone have a clue what this is about and how I pagehide a js file?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @wordpresshat

    Thanks for reaching out!

    LifterLMS content should be excluded from your cache due to the dynamic nature of the content.

    For example, if you have premium content restricted to a membership plan, casual visitors may be able to access it if it is cached incorrectly. This can literally eat into your revenue.

    The best thing to do here is to exclude LifterLMS pages and post types from your cache. We have more information on how to do this on our lifterlms.com documentation here: https://lifterlms.com/docs/caching-issues-faqs/

    If you’d like to do more with pagehide, though we don’t really think this is necessary, you’ll want to reach out to GTMetrix for their best practices on adding this code to your site.

    Let us know if you have any further questions!

    Since I haven’t heard back from you in a week I’m going to mark this thread as resolved. Don’t worry, if you have more questions or still need help just hit reply and let me know!

    Have a great day!

    Thread Starter wordpresshat

    (@wordpresshat)

    Thanks, Natalie, I have not had the time to look through it, but I’ll make sure I follow your sent instructions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unload Event Listeners?’ is closed to new replies.