Delay JS

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32872
    deinurlaubsdeal
    deinurlaubsdeal
    Participant

    Hi,

    I am currently optimizing my page performance and I noticed Google isn’t that happy with a JS execution regarding your plugin.

    Is there a way to delay the execution or will there be problems? I use WPRocket so I could delay it with their function if you provide further information.

    Thanks,
    Caio

    Attachments:
    You must be logged in to view attached files.
    #32875
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    You can try rocket loader or similar solutions, but if your scripts are loaded in the site footer already (non-blocking), then the execution time is not noticable to users whatsoever – regardless of the measured time. Even using rocket loader the scripts are still executed, but may not show up on the measurement tool – but that does not mean it is better whatsoever, as they still need to be executed.
    Personally, I would not bother with external script loaders, as WordPress has a preferred order of loading jQuery and other prerequesites, some may also have event handlers on the page load event etc.. If your page loads up nicely, is properly cached, then by the time the user starts scrolling the scripts are already executed.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #32879
    deinurlaubsdeal
    deinurlaubsdeal
    Participant

    Hi Ernest,

    thanks for the quick reply.

    Sounds good, but just to be sure: I want to optimize my site for the new Core Web Vitals and if I understand you correctly, even if I make the proposed changes there will be no change for the Core Web Vitals?

    So, for example, having a Google PageSpeed score of 34 mobile and 90 on desktop will still have me ranking nicely or at least not being “punished” by Core Web Vitals?

    Thanks,
    Caio

    #32892
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Core Web Vitals are metrics to help you otpimize your site. The metrics may show an improvement, but in my opinion introducing a 3rd party asset to fix something, that may not be noticable to the end user, and only the number in the metrics changes is redundant.
    Definitely try it though, I might be wrong and it may actually introduce some visual improvement as well, unfortunately there are a lot of thing I don’t know yet.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.