Title: Conditional Assets
Last modified: February 11, 2024

---

# Conditional Assets

 *  Resolved [WebCodePoet](https://wordpress.org/support/users/senjoralfonso/)
 * (@senjoralfonso)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/conditional-assets/)
 * I have noticed, that /cf7-antispam/build/script.js is load on all front pages,
   even without a contact form.
 * Could you please load it conditionally only where it is needed?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Erik](https://wordpress.org/support/users/codekraft/)
 * (@codekraft)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/conditional-assets/#post-17419057)
 * I had read that the author of cf7 was working on it, would be a good to have.
   I should trigger enqueue of assets only when cf7 fires an action telling me to
   do so, but for now I think it is not time yet, below some links for more details.
 * [https://github.com/rocklobster-in/contact-form-7/issues/1278](https://github.com/rocklobster-in/contact-form-7/issues/1278)
   
   [https://github.com/rocklobster-in/contact-form-7/issues/1339](https://github.com/rocklobster-in/contact-form-7/issues/1339)
   In any case yes, conditional loading I will put it among the next things, good
   idea 😊

Viewing 1 replies (of 1 total)

The topic ‘Conditional Assets’ is closed to new replies.

 * ![](https://ps.w.org/cf7-antispam/assets/icon.svg?rev=2536700)
 * [AntiSpam for Contact Form 7](https://wordpress.org/plugins/cf7-antispam/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-antispam/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-antispam/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-antispam/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-antispam/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-antispam/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Erik](https://wordpress.org/support/users/codekraft/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/conditional-assets/#post-17419057)
 * Status: resolved