Site logo

[Support request] javascript in header elements?

Home Forums Support [Support request] javascript in header elements?

Home Forums Support javascript in header elements?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1891099
    Streater

    I have finally achieved a fantastic speed score thanks to GP. So thank you to your team for putting up with me!

    But in doing so there are some glitches to the site I’ve been trying to figure out. I am using WP Rocket (along with autoptimize) and when I use the WP Rocket feature called Delay Javascript Execution, it greatly speeds up my site. BUT header element images don’t show up until a User interacts with the site on mobile.

    There is an option to add the Javascript code to exclude from this feature (this worked with my Intercom Javascript) but I can’t figure out why it is blocking the images from loading until interaction.

    I turn off the feature and everything works again but my site is much slower.

    Any ideas?

    #1891128
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I understand the question.

    GP doesn’t use javascript for header elements.

    Have you tried checking with WP Rocket’s support team and see if they can help providing a solution?

    #1891134
    Streater

    I messaged them and haven’t heard anything… but I thought since it was your element it was effecting you might have an idea.

    #1891286
    Elvin
    Staff
    Customer Support

    Hi there,

    I messaged them and haven’t heard anything… but I thought since it was your element it was effecting you might have an idea.

    Can you point us to a sample page in question where the issue occurs? And perhaps provide a screen recording showing what happens?

    I’ve visited some parts of the site and while the image’s loading time is delayed, it still loads even without interaction (ex. Our story page).

    And I think the main issue with this is the file size. 397kb is pretty huge. Consider trying to compress it further.

    #1892318
    Streater

    So I figured out some work arounds for most pages. But it is still an issue for posts (link to a post below).

    I did unfortunately deactivate the WP Rocket Delay Javascript Execution feature though since it was conflicting with the Autoptimize Lazy Load image feature. Either one or the other can work at one time, otherwise there is a caching issue.

    Now Autopotimize doesn’t load post article header images until user interaction… no way to turn off the feature for posts as far as I’ve searched.

    I have put out support messages to both services… not sure if you have anything to offer here but just thought I should update.

    #1892701
    Elvin
    Staff
    Customer Support

    While the 2 plugins can work together, I recommend using only one plugin if one can do all the things you need to avoid this kind of issue.

    If autoptimize is used mainly for lazy load optimization, I think WP Rocket has this feature as well so you might as well just stick with WP rocket instead of having to maintain 2 plugins.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.