Now I am using Node.js (CentOS / cPanel setup on VPS) then .htaccess becomes pretty irrelevant
I have noticed recently that the amount of .js and .css loaded by some web pages is negatively impacting on load times and thought this may help
Is there a node equivalent to force caching of these resources?
Google seems pretty unproductive on this topic
I found a similar issue, and although this is not a fix by any means, i did find that using Gumlet was the easiest solution, and most sites could probably get away with their free tier, however even their paid tier is very cheap.
It does not give the granular control you had in the .htaccess file, but it does give you a cache time, i use it for all my scripts too, and their lazy load is really decent, had significant speed increases on the site.
@psweb So gumlet can be used to optimise .js and .css?
My issue is that it takes twice the time to load all the .js and .css in the layout page than it does to load the content.
Lazyloading embedded (Iframe) video has helped (lots of embedded video on site) but the .js and .css remains problematic
I suppose that is a node.js issue i had not thought about. Because the layout page holds all the component and css links for all the associated content pages they can get very heavy in .js and .css links
Hey Brian, yes Gumlet serves all your CSS and js files too, it really does give a pretty huge speed improvement, in all honestly I would try it if I were you.
Thanks @psweb for that
Tried @Apple suggestion but improvement was minimal (but thanks for your time and effort anyway Apple) . Paul, any trips on implementation gratefully accepted
Its luckily a super simple integration, pretend your website is called thesmurf.com
Go create a gumlet.com account, create an image source, and point that to your TLD, example https://www.thesmurf.com
This will give you an option to create a Gumlet subdomain, so something like thesmurf.gumlet.io
Once done go to Wappler and add this to your main.ejs head section
No to make Gumlet serve all images just change <img src="/images/pic.jpg">
to <img data-src="/images/pic.jpg">
For all your scripts change the src from <script src="/dmxAppConnect/dmxAppConnect.js"></script>
to <script src="https://thesmurf.gumlet.io/dmxAppConnect/dmxAppConnect.js"></script>
And stylesheets the same, just add the https://thesmurf.gumlet.io in front of the href part.
Yes, it does do it on auto, but the docs suggest you still change from src to data-src and give some long explanation about how not doing it actually loads the image twice instead of once