Load only necessary js and css requests
Our quasar app is available under https://mtest.examsdaily.in.
Upon careful inspection we found that our homepage load generates around 200 requests, around a hundred CSS and Js files.We would like the components to be loaded as and when required in any particular page. The problem is our homepage loading is flooded with many number of requests we provided.
Like for instance our payments provider, we want to be loaded only on certain pages, similarly the video js components to be loaded under video occuring pages only. But we are stuck as everything gets loaded everywhere in our site…
Where do we get wrong or what trick are we missing here. The logic that necessary js and css files to be loaded on selective pages only, but we find it difficult to achieve.
Disclaimer: We have very amateur developers and hope somebody educate, help us on this issue.
Thanks in advance
dobbel last edited by dobbel
It’s hard to say if you don’t have any info on how your app is structured, like do you use a router? ect?
maybe this will help:
lazy loading routes :
you don’t want this:( read the warning)