benbusby / whoogle-search

A self-hosted, ad-free, privacy-respecting metasearch engine
https://pypi.org/project/whoogle-search/
MIT License
9.52k stars 936 forks source link

[FEATURE] Reduce the number of CSS and JS files #655

Open ngosang opened 2 years ago

ngosang commented 2 years ago

When I use Whoogle I see several requests for static resources in my web browser. image

Of course, this is not a big issue because the browser is smart and it has a cache to avoid requesting these files all the time.

My request is to use some tool to merge all CSS files into one and all JS files into one to increase page load speed.

In JS/NodeJS/NPM world we use Webpack to combine all static resources into one + minify the code (remove comments and other useless things for the browser). This is only required for production builds, you can have several files for development as it should be.

Example => https://code.luasoftware.com/tutorials/webpack/merge-multiple-css-into-single-file/

DUOLabs333 commented 2 years ago

The problem is that, for example autocomplete.js is loaded depending on the environment variables.