wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
702 stars 219 forks source link

Exclude Pixfuture files to prevent issues with their video ads #4179

Closed vmanthos closed 2 years ago

vmanthos commented 3 years ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug

A pop-up ad video wasn't displayed when the Delay JavaScript Execution feature was active.

Excluding the following resolved the issue:

handlePixMessage
var corner_video
cdn.pixfuture.com/hb_v2.js
cdn.pixfuture.com/pbix.js
served-by.pixfuture.com/www/delivery/ads.js
served-by.pixfuture.com/www/delivery/headerbid_sticky_refresh.js
serv-vdo.pixfuture.com/vpaid/ads.js

To Reproduce Steps to reproduce the behavior:

Not relevant in this case.

Expected behavior

The video should be displayed when Delay JavaScript Execution is active.

Screenshots

Screencast of the pop-up video: https://youtu.be/Vw3bBbrR2Q4

Additional context

Related ticket: https://secure.helpscout.net/conversation/1571442407/279674/ Backlog Grooming (for WP Media dev team use only)

mostafa-hisham commented 3 years ago

@vmanthos is Pixfuture a plugin?

mostafa-hisham commented 3 years ago

if Pixfuture is not a plugin

Reproduce the issue :heavy_multiplication_x:

Identify the root cause ✅

The script should not be delayed to avoid this problem

Scope a solution ✅

Add

handlePixMessage
var corner_video
cdn.pixfuture.com/hb_v2.js
cdn.pixfuture.com/pbix.js
served-by.pixfuture.com/www/delivery/ads.js
served-by.pixfuture.com/www/delivery/headerbid_sticky_refresh.js
serv-vdo.pixfuture.com/vpaid/ads.js

as patterns in the WP_Rocket\Engine\Optimization\DelayJS\HTML::$excluded array and update the fixtures to validate

Estimate the effort ✅

Effort [XS]