Purpose
This article explains how to configure WP Rocket so that JavaScript assets served from any *.heavyset.tech sub‑domain are neither cached nor minified by the plugin’s optimization features, and so that embedded form iframes are not lazy‑loaded. Following these steps prevents double‑caching or unwanted minification of assets already delivered via the CDN and ensures that forms load immediately for end‑users.
Audience
- HeavySet Tech developers maintaining form embeds on WordPress sites.
- Marketing & content teams who manage WordPress but do not write code.
Prerequisites
- Administrator access to the WordPress dashboard.
- WP Rocket plugin installed and activated.
Step 1 Exclude CDN‑Hosted JavaScript and Disable Minification
1.1 Open File Optimization Settings
WordPress Admin → Settings → WP Rocket → File Optimization
1.2 (Optional) JavaScript Minification for Other Scripts
This setting is optional and does not affect any file from *.heavyset.tech once you complete Step 1.3.
- Enable “Minify JavaScript files” only if you want WP Rocket to minify non‑HeavySet scripts (e.g., theme or other plugin assets).
- Leave it disabled if you prefer no JavaScript minification anywhere.
Either way, the exclusion you add in the next step guarantees WP Rocket will never alter or cache HeavySet Tech CDN files.
1.3 Add CDN Pattern to Excluded JavaScript Files
In JavaScript Files → Excluded JavaScript Files, paste:
heavyset.tech
This wildcard string matches any URL that contains heavyset.tech, covering variants such as cdn.heavyset.tech, static.heavyset.tech/js/, etc. Files listed here will not be minified, concatenated, deferred, or delayed by WP Rocket.
1.4 (If Used) Exclude from Delay JavaScript Execution
If “Delay JavaScript execution” is enabled, scroll to its exclusion field and add the same pattern heavyset.tech.
Step 2 Disable Lazy Loading for Iframes (Forms)
2.1 Open Media Settings
WP Rocket → Media
2.2 Adjust LazyLoad Options
Under LazyLoad:
- Uncheck “Enable for iframes and videos”.
This prevents WP Rocket from adding loading="lazy" to <iframe> tags—including HeavySet Tech form embeds—so the forms render immediately.
Step 3 Verify Configuration
- View Page Source and make sure CDN JavaScript URLs are not rewritten (no
?ver=moves, no minified path, not wrapped in an inline loader). - Inspect the form
<iframe>using browser DevTools. Confirm it does not include aloading="lazy"attribute.
Step 4 Clear Cache & Test Changes
After adjusting settings, you must purge caches so the live site serves the updated assets.
- Clear WP Rocket Cache
- Hover over the WP Rocket top‑bar menu in WordPress and click “Clear Cache.”
- —or— Go to WP Rocket → Dashboard → Clear Cache.
- Hover over the WP Rocket top‑bar menu in WordPress and click “Clear Cache.”
- Purge CDN/Edge Cache (if you use Cloudflare, Fastly, etc.) so the excluded files are fetched fresh.
- In Cloudflare, click “Purge Everything” or purge the specific URLs under heavyset.tech.
- Hard‑refresh your browser (Ctrl + F5 / Cmd + Shift + R) or open an incognito window to bypass local caching.
- Re‑verify with DevTools that:
- HeavySet JS files show a 200/304 response from the CDN and are not concatenated/minified.
- The form
<iframe>loads without aloading="lazy"attribute.
Troubleshooting & FAQ
| Symptom | Possible Cause | Resolution |
|---|---|---|
| CDN JS still minified or combined | Pattern entered incorrectly (e.g., missing domain) or minification done by another plugin/CDN layer | Re‑enter heavyset.tech on a new line in both exclusion boxes, and disable any overlapping optimizations in other plugins or the CDN. |
<iframe> still lazy‑loads | Another plugin or the theme forces LazyLoad | Disable LazyLoad in that plugin or add a filter to disable iframe lazy‑loading globally. |
Appendix A Code Snippets (Advanced Alternative)
If a code‑level solution is preferred, add the following filter in functions.php:
// Exclude HeavySet Tech CDN scripts from WP Rocket optimization
add_filter( 'rocket_exclude_js', function( $excluded_js ) {
$excluded_js[] = 'heavyset.tech';
return $excluded_js;
});
// Disable lazy‑loading for all iframes
add_filter( 'wp_lazy_loading_enabled', function( $default, $tag, $context ) {
return ( $tag === 'iframe' ) ? false : $default;
}, 10, 3 );Use this only if UI‑based configuration is insufficient or another plugin overrides WP Rocket settings.
Comments
0 comments
Please sign in to leave a comment.