Title: CSS/JS performance improvement
Last modified: January 16, 2025

---

# CSS/JS performance improvement

 *  Resolved [Antony Booker](https://wordpress.org/support/users/antonynz/)
 * (@antonynz)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-js-performance-improvement/)
 * Thanks for this plugin. 
   I noticed the CSS and JS files loaded from [uploads/essential-addons-elementor](https://cleanbeautycollective.co.nz/wp-content/uploads/essential-addons-elementor/eael-46490.js?ver=1736986165)/
   eael-templateid… contain a different version number (based on the date a post
   was modified) on each page, which forces the browser to redownload the files 
   on each page view. The template file ID seems to be for the header and footer
   templates so the same script file name is loading on each page but with a different
   version.I’m assuming the get_post_modified_time() line was intending to be get_post_modified_time(
   $dynamic_asset_id) ? in the enqueue_asset function.In this case the CSS and JS
   files are actually empty but a quick performance improvement could be to change
   the get_post_modified_time to set the version based of when the file was modified
   i.e changing:
 *     ```wp-block-code
       public function enqueue_asset( $post_id = null, $elements = [], $context = 'view' ) {		$dynamic_asset_id = ( $post_id ? '-' . $post_id : '' );		if ( $this->css_print_method == 'internal' ) {			$this->css_strings .= $this->elements_manager->generate_strings( $elements, $context, 'css' );		} else {			if ( ! $this->has_asset( $post_id, 'css' ) ) {				$this->elements_manager->generate_script( $post_id, $elements, $context, 'css' );			}			wp_enqueue_style(				'eael' . $dynamic_asset_id,				$this->safe_url( EAEL_ASSET_URL . '/' . 'eael' . $dynamic_asset_id . '.css' ),				[ 'eael-general' ],				get_post_modified_time()			);		}		if ( $this->js_print_method == 'internal' ) {			$this->custom_js .= $this->elements_manager->generate_strings( $elements, $context, 'js' );		} else {			if ( ! $this->has_asset( $post_id, 'js' ) ) {				$this->elements_manager->generate_script( $post_id, $elements, $context, 'js' );			}			wp_enqueue_script(				'eael' . $dynamic_asset_id,				$this->safe_url( EAEL_ASSET_URL . '/' . 'eael' . $dynamic_asset_id . '.js' ),				[ 'eael-general' ],				get_post_modified_time(),				true			);		
       ```
   
 * to:
 *     ```wp-block-code
       public function enqueue_asset( $post_id = null, $elements = [], $context = 'view' ) {		$dynamic_asset_id = ( $post_id ? '-' . $post_id : '' );		if ( $this->css_print_method == 'internal' ) {			$this->css_strings .= $this->elements_manager->generate_strings( $elements, $context, 'css' );		} else {			if ( ! $this->has_asset( $post_id, 'css' ) ) {				$this->elements_manager->generate_script( $post_id, $elements, $context, 'css' );			}			wp_enqueue_style(				'eael' . $dynamic_asset_id,				$this->safe_url( EAEL_ASSET_URL . '/' . 'eael' . $dynamic_asset_id . '.css' ),				[ 'eael-general' ],				filemtime( EAEL_ASSET_PATH  . '/' . 'eael' . $dynamic_asset_id . '.css' ),			);		}		if ( $this->js_print_method == 'internal' ) {			$this->custom_js .= $this->elements_manager->generate_strings( $elements, $context, 'js' );		} else {			if ( ! $this->has_asset( $post_id, 'js' ) ) {				$this->elements_manager->generate_script( $post_id, $elements, $context, 'js' );			}			wp_enqueue_script(				'eael' . $dynamic_asset_id,				$this->safe_url( EAEL_ASSET_URL . '/' . 'eael' . $dynamic_asset_id . '.js' ),				[ 'eael-general' ],				filemtime( EAEL_ASSET_PATH  . '/' . 'eael' . $dynamic_asset_id . '.js' ),				true			);		}	}
       ```
   
 * Would it be possible to implement this performance tweak?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Sadman Sakib Nadvi](https://wordpress.org/support/users/sadmansakibnadvi/)
 * (@sadmansakibnadvi)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-js-performance-improvement/#post-18247475)
 * Hello [@antonynz](https://wordpress.org/support/users/antonynz/) ,
   I hope you
   are doing well.Thank you for reaching out to us. I have informed our development
   team about your request, and they will evaluate its feasibility. Please allow
   us some time to investigate. I will get back to you as soon as I have an update
   from them.
 * Thank you!
 *  Plugin Support [Sadman Sakib Nadvi](https://wordpress.org/support/users/sadmansakibnadvi/)
 * (@sadmansakibnadvi)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-js-performance-improvement/#post-18284925)
 * Hello [@antonynz](https://wordpress.org/support/users/antonynz/) ,
 * Greetings!
 * Thank you for your valuable suggestions. Our development team has reviewed the
   feasibility and will be working on implementing these improvements soon. We truly
   appreciate your feedback and will keep you updated on the progress.
 * Thanks again for your input—it helps us enhance our plugin.
 * Have a great day!
 * Best regards,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CSS/JS performance improvement’ is closed to new replies.

 * ![](https://ps.w.org/essential-addons-for-elementor-lite/assets/icon-256x256.
   gif?rev=3182943)
 * [Essential Addons for Elementor - Popular Elementor Templates & Widgets](https://wordpress.org/plugins/essential-addons-for-elementor-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/essential-addons-for-elementor-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/essential-addons-for-elementor-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/essential-addons-for-elementor-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/essential-addons-for-elementor-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/essential-addons-for-elementor-lite/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 2 replies
 * 3 participants
 * Last reply from: [Sadman Sakib Nadvi](https://wordpress.org/support/users/sadmansakibnadvi/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/css-js-performance-improvement/#post-18284925)
 * Status: resolved