Open Tabrisrp opened 5 years ago
We just had a case where the optimizations were applied to the embedded posts, causing a console error because of our DJE code.
The problem was the site doesn't use a trailing slash, so the embedded URL doesn't have a trailing slash after /embed
:
https://site.com/2024/07/post-slug/embed#?secret=3jlHiimGWI%23?secret=F4WphFV28Y
and in our exclusion, we have the trailing slash:
Manually excluding (.*)/embed
using the UI fixes the case.
We could consider making the trailing slash respect the current site settings
related slack thread (Internal): https://wp-media.slack.com/archives/C08N8J6VC/p1724082778400369?thread_ts=1723478860.717459&cid=C08N8J6VC
When a post/page is loaded inside another one via the WP Embeds system, the content should not be cached/optimized, as that can cause display issues.
The content is loaded in an iframe, which can be optimized by the lazyload instead.
We can auto exclude the
/(.*)/embed/
pattern to do that.