Optimise page speed -> load HikaShop css and js files only on shop pages

  • Posts: 60
  • Thank you received: 9
  • Hikashop Business
5 days 5 hours ago #371636

-- HikaShop version -- : 6.4.1
-- Joomla version -- : 6.1.0
-- PHP version -- : 8.3.30

Hi

I need to optimise a client’s Joomla 6.1 website using HikaShop 6.4.1. I’ve noticed that the following files are also being loaded on pages where no HikaShop element is present:

domain.com/media/com_hikashop/css/hikashop.css?v=6412604221935
domain.com/media/com_hikashop/css/style_custom.css?t=1772724241
domain.com/media/com_hikashop/css/notify....css?v=6412604221935
domain.com/media/com_hikashop/js/hikashop.js?v=6412604221935
domain.com/media/com_hikashop/js/notify.min.js?v=6412604221935
domain.com/plugins/hikashop/cartnotify/media/notify.js

Is it possible to load these files exclusively on the shop pages in order to improve the loading time of the other pages?

Regards
Stef

Please Log in or Create an account to join the conversation.

  • Posts: 85509
  • Thank you received: 13988
  • MODERATOR
4 days 16 hours ago #371638

Hi,

Yes. You can edit the HikaShop User Synchronization plugin settings via the Joomla plugins manager and turn off the "Load HikaShop on all pages" setting.

Note however that it shouldn't change much regarding loading time. The problem is probably elsewhere.

Also, this has the drawback that the HikaShop content tags won't work properly on non HikaShop pages:
www.hikashop.com/support/documentation/1...-product-insert.html
(normal since content tags can't be replaced by HikaShop if HikaShop is not loaded)

Note also that even if the page is not a "HikaShop page", as long as you have the cart module or a products listing module or the currency switch module displayed on the page, HikaShop will be loaded since it is necessary to display these.

Please Log in or Create an account to join the conversation.

Time to create page: 0.041 seconds
Powered by Kunena Forum