When the feed resources loading the page is freezing

  • Hello,

    We are using the Elfsight LinkedIn Feed widget together with WP Rocket (Delay JavaScript enabled).

    The issue we are seeing:

    • When a visitor first interacts with the page, WP Rocket triggers the delayed scripts.

    • At that moment, the LinkedIn Feed resources start loading and the whole page freezes for a few seconds — even the navigation menu is unusable — until the feed finishes initializing.

    • To work around this, we wrote custom JavaScript that only loads the feed when the container is actually in the viewport. This prevents the freeze, but it means we are not relying on the default embed anymore.

    Can you confirm if there is an official way to:

    1. Prevent the freeze when the feed initializes, or

    2. Load the feed in a more lightweight/lazy way (similar to how our custom script works), while still using the standard Elfsight integration?

    Any recommendations or best practices from your side would be very helpful.

  • https://www.dtemballage.dk/

2 Likes

Welcome to the Community :waving_hand:, @user1353

Please try to add a platform script (the 1st line of the widget’s installation code) to WP Rocket exceptions :slightly_smiling_face: