Title: Avoid serving legacy JavaScript to modern browsers
Last modified: November 11, 2020

---

# Avoid serving legacy JavaScript to modern browsers

 *  [Bluemad](https://wordpress.org/support/users/bluemad/)
 * (@bluemad)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/avoid-serving-legacy-javascript-to-modern-browsers-2/)
 * 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](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](https://wordpress.org/support/users/brechtvds/)
 * (@brechtvds)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/avoid-serving-legacy-javascript-to-modern-browsers-2/#post-13650548)
 * 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](https://wordpress.org/support/users/bluemad/)
 * (@bluemad)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/avoid-serving-legacy-javascript-to-modern-browsers-2/#post-13696154)
 * 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 5 years, 6 months ago by [Bluemad](https://wordpress.org/support/users/bluemad/).
 *  Thread Starter [Bluemad](https://wordpress.org/support/users/bluemad/)
 * (@bluemad)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/avoid-serving-legacy-javascript-to-modern-browsers-2/#post-13696694)
 * 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 5 years, 6 months ago by [Bluemad](https://wordpress.org/support/users/bluemad/).
    -  This reply was modified 5 years, 6 months ago by [Bluemad](https://wordpress.org/support/users/bluemad/).
    -  This reply was modified 5 years, 6 months ago by [Bluemad](https://wordpress.org/support/users/bluemad/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Avoid serving legacy JavaScript to modern browsers’ is closed to new 
replies.

 * ![](https://ps.w.org/wp-recipe-maker/assets/icon-256x256.png?rev=2967063)
 * [WP Recipe Maker](https://wordpress.org/plugins/wp-recipe-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-recipe-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-recipe-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-recipe-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-recipe-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-recipe-maker/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bluemad](https://wordpress.org/support/users/bluemad/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/avoid-serving-legacy-javascript-to-modern-browsers-2/#post-13696694)
 * Status: not resolved