woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.91k stars 1.69k forks source link

FlexSlider prevents use of back/forward cache #1806

Closed JasonBarnabe closed 2 months ago

JasonBarnabe commented 2 years ago

https://web.dev/bfcache/#test-to-ensure-your-pages-are-cacheable

When running on a page with FlexSlider 2.6.3, I get the result Pages that use SpeechSynthesis are not currently eligible for back/forward cache.

Adding a property breakpoint reveals it's this function:

ya=function(){if("undefined"==typeof a)return!1;for(var b in a)try{!xa["$"+b]&&O(a,b)&&null!==a[b]&&"object"==typeof a[b]&&wa(a[b])}catch(c){return!0}return!1}()

Adjusting to the following makes Chrome report the page is back/forward cacheable:

ya=function(){if("undefined"==typeof a)return!1;for(var b in a)try{if(b=="speechSynthesis"){return !0}!xa["$"+b]&&O(a,b)&&null!==a[b]&&"object"==typeof a[b]&&wa(a[b])}catch(c){return!0}return!1}()