Title: Javascript Files Size
Last modified: July 7, 2022

---

# Javascript Files Size

 *  Resolved [sannin](https://wordpress.org/support/users/sannin/)
 * (@sannin)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-files-size/)
 * The javascript file the plugins uses is ~180Kbs, which is quite bad for core 
   vitals. If you add the woocommerce addon, you have another ~180Kbs.
 * Is it possible to reduce the size of the files, and combine the core js with 
   the woocommerce one?

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

 *  Plugin Contributor [digamberpradhan](https://wordpress.org/support/users/digamberpradhan/)
 * (@digamberpradhan)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-files-size/#post-15805351)
 * Hi Sannin,
 * The file sizes are admittedly large, but as we are using the algolia instant 
   search and autocomplete libraries – it is unavoidable at the moment – we are 
   looking into alternatives to see how to make it better, but there isn’t a quick
   fix.
 * If you are only using the instant search for WooCommerce shop and not autocomplete
   or instant search for the base plugin then you can dequeue the script for the
   base plugin with the following code.
 *     ```
       add_action('wp_print_scripts','cm_07072022_dequeue_scripts');
       function cm_07072022_dequeue_scripts(){
       	wp_dequeue_script('cm-typesense-frontend');
       	wp_deregister_script('cm-typesense-frontend');
       }
       ```
   
 * However – please keep in mind this will disable the base plugins functionality.
   
   Hope this helps.
 *  Thread Starter [sannin](https://wordpress.org/support/users/sannin/)
 * (@sannin)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-files-size/#post-15805400)
 * So the js file of woocommerce addons just adds the instant search functionality?
 * If i just use the autocomplete, can i safely remove it?
 *  Plugin Contributor [digamberpradhan](https://wordpress.org/support/users/digamberpradhan/)
 * (@digamberpradhan)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-files-size/#post-15805487)
 * Hi Sannin,
    Are you replacing WordPress search with Typesense search ? Or are
   you replacing WooCommerce search with Typesense WC Search ?
 * If it’s the first – then yes you can safely remove WooCommerce js files.
    If 
   it’s the second – you would need to replace SWT js files.
 * I hope that makes sense.
    All in all – please do test before implementing.

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

The topic ‘Javascript Files Size’ is closed to new replies.

 * ![](https://ps.w.org/search-with-typesense/assets/icon-256x256.png?rev=3095079)
 * [Search with Typesense](https://wordpress.org/plugins/search-with-typesense/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-with-typesense/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-with-typesense/)
 * [Active Topics](https://wordpress.org/support/plugin/search-with-typesense/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-with-typesense/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-with-typesense/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [digamberpradhan](https://wordpress.org/support/users/digamberpradhan/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-files-size/#post-15805487)
 * Status: resolved