Title: Loads CSS/JS whenever needs
Last modified: December 31, 2023

---

# Loads CSS/JS whenever needs

 *  [Alexander Guskov](https://wordpress.org/support/users/forcesail/)
 * (@forcesail)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/loads-css-js-whenever-needs/)
 * Hello,
 * Contact-form-7 offer ability to manage the loading CSS/JS only where contact 
   form presented, but “Redirection for Contact Form 7” plugin unfortunately destroys
   this functionality.
 * If you would change line
   add_action( ‘wp_enqueue_scripts’, array( $this, ‘front_end_scripts’));
   toadd_action( ‘wpcf7_enqueue_scripts’, array( $this, ‘front_end_scripts’ ) );
 * in method add_actions() of class WPCF7r_Form_Helper it resolved the problem, 
   but not completely. It world be better for site performance if plugin enqueued
   scripts and styles when it loads from Contact-form-7 and added strategy=defer.
 * Since WordPress 3.3 plugin can enqueued scripts and styles everywhere and if 
   in_footer=false it happens immediately.
 * Please!

The topic ‘Loads CSS/JS whenever needs’ is closed to new replies.

 * ![](https://ps.w.org/wpcf7-redirect/assets/icon-256x256.gif?rev=3416723)
 * [Redirection for Contact Form 7](https://wordpress.org/plugins/wpcf7-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpcf7-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpcf7-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/wpcf7-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpcf7-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpcf7-redirect/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Alexander Guskov](https://wordpress.org/support/users/forcesail/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/loads-css-js-whenever-needs/)
 * Status: not resolved