• When I check my site performance using Google lighthouse and page speed insight, it shows the following warning regarding the WP recipe maker JS.

    Avoid serving legacy JavaScript to modern browsers
    Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren’t necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. Learn More

    https://site.com/wp-content/plugins/wp-recipe-maker/dist/public-modern.js

    .

    Any future update will fix this issue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brecht

    (@brechtvds)

    We do include some polyfill JS to make sure as many browsers are supported but the amount should be negligible and not really have much of an impact. What is it showing as file size or potential savings?

    I can look into optimizing this some more, but I don’t think there’s a lot to be won here.

    Thread Starter Bluemad

    (@bluemad)

    I have no clear idea, now again pagespeed insight not showing that error. I’m sorry right now I can’t reproduce that error. Wait a few days can’t reproduce it. So I made this issue as solved.

    Thank you for your support.

    • This reply was modified 3 years, 11 months ago by Bluemad.
    Thread Starter Bluemad

    (@bluemad)

    Today I can see this warning and its potential saving is “10.9 KiB” and Estimated Savings is 0.15s. This warning only shows the “Mobile” version test, Desktop test no warning.

    Pagespeed insight and lighthouse give the same results.

    /wp-content/plugins/wp-recipe-maker/dist/public-modern.js

    Array.prototype.forEach
    Array.from
    Object.getOwnPropertyNames

    • This reply was modified 3 years, 11 months ago by Bluemad.
    • This reply was modified 3 years, 11 months ago by Bluemad.
    • This reply was modified 3 years, 11 months ago by Bluemad.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Avoid serving legacy JavaScript to modern browsers’ is closed to new replies.