Google Page Speed, defer javascript and lazy load images

Hi. I am striving to score high performance for google page speed for cs-cart multivendor 4.17.1, hosted on ubuntu with nginx 1.25.

Currently the website performance is 46.
Speed Index 8.1 s on mobile devices.

Please note: I shall be converting few images to WebP format for better compression.

1a. I am trying to defer loading of following auto generated JavaScript file, but cannot find where to add this tag. I have tried making changes in \app\functions\smarty_plugins\function.script.php and \design\themes\responsive\templates\index.tpl but couldnot get the desired result.

Please inform or suggest better alternative.

1b. How to defer non-critical js and css ?

  1. Lets inform how to lazy load images or defer off-screen images) through tempalte, html and javascript code modifications and without any paid add on.
    I have tried Lazy images load by Retail Factory, but instead website performance decreases from 46 to 26 for mobile devices.

  2. How to defer or lazy load images banners & sliders ?

  3. How to reduce the impact of third party code like google cdn and jquery cdn and reduce third party script execution time ?

  4. how to cache fonts and static elements ?

  5. how to Ensure CSP is effective against XSS attacks

Thankyou !