Additional Js Remove Through Reference Block Magento2

We can remove the blocks from the site. It is helpful to reduce js files. That way you increase the website loading speed.
  • The number of server requests.
  • The size of those server requests.

Follow below the steps

Removing Block Through (XML)
These are the main XML files,
  • cms_index_index.xml (Home page)
  • Catalog_catagory_view.xml (Category/Listing Page)
  • Catalog_product_page.xml (Product page)
Removing the authentication-popup-block
< referenceBlock name=”authentication-popup” remove=”true” / >
Like no. of JS file removed
  • adapter.js
  • authentication-popup.js
  • buttons.js
  • captcha.js
  • captchaList.js
  • defaultCaptcha.js
  • effect-blind.js
  • form.js
  • login.js
  • loginCaptcha.js
  • messages.js
  • refresh.js
  • resolver.js
  • validate-review.js
  • spinner.js
  • Ui-messages-mixin.js
Removing mini-cart -Block
< referenceBlock name=”minicart” remove=”true” / >
Like no. of JS Files Removed
  • Authentication-popup.js
  • alert.js
  • blockloader.js
  • decorate.js
  • dropdown.js
  • element-fade.js
  • effect.js
  • image.js
  • mini-cart.js
  • sidebar.js
  • totals.js
Removing compare -Block
< referenceBlock name=”catalog.compare.link” remove=”true” / >
Like no. of JS Files removed
  • Compare-products.js
Removing the Search-bar Block
< referenceBlock name=”top.search” remove=”true” / >
Like no. of JS Files Removed
  • form-mini.js
Removing add-to-wishlist Block
< referenceBlock name=”category.product.list.additional.wishlist_addto” remove=”true”/ >
Like no of JS Files Removed
  • Add-to-wishlist.js
  • Also You remove Wishlist full Block through Magento-Backend – (Path) Open- Backend > Store > configuration > customers > Wishlists > Disabled it.
Removing Top Links Block
< referenceBlock name=”top.links” remove=”true” / >
Removed top-link in page.
(Navigation Menu Like-Sign In, create-account)

Latest Posts

Leave A Comment