rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Rewrite Titles blocks optimizations from WP Rocket #140

Open webtrainingwheels opened 1 year ago

webtrainingwheels commented 1 year ago

Describe the bug When the Rewrite Titles feature is activated, optimizations from WP Rocket are not applied.

To Reproduce Steps to reproduce the behavior:

  1. Activate File Optimizations in WP Rocket
  2. Activate Rewrite Titles in Rank Math
  3. Clear the cache
  4. Visit the site in a private window, you will see that page caching is applied, but file optimizations are not.

Expected behavior File optimizations should be applied.

Additional context I think the problem is probably the use of ob_get_clean() in /class-head.php This clears out the buffer, leaving it empty. WP Rocket uses the buffer to perform optimizations. If it's empty, we can't optimize it.