Answer the question
In order to leave comments, you need to log in
Does http2 help in large js applications (react, vue, angular)?
I'm dealing with the issue of loading data in a large application on Vue.js and I can't figure out how to solve the problem of loading data the first time the application is accessed.
Now there are several blocks that, when initialized through Axios, load their data. It turns out several HTTP requests. How do they solve this problem?
I saw someone inserting all the data in the JSON video right into the HTML on the first load. Also, you can make a separate controller for each page, which would collect all the data. Another option is to leave multiple requests and use HTTP2 (how efficient would that be?)
I'm leaning towards http2, with multiple requests, but I'm not sure about the efficiency.
Is there any best practice for this?
Answer the question
In order to leave comments, you need to log in
Faced similar. I solved the problem this way, when loading the page, I did not load all the data, but only a small part (sufficient for the user to start using the application), and information about the amount of all data. And after that loaded the rest of the data. For the user, this is not noticeable, and the download speed of the application at the first access increases significantly.
Alternatively, you can use GraphQL.
http2 c php in the classic version, for example, will not help, because a separate process on the server will still be launched for each request, and this is expensive.
a lot depends on the specific application, and maybe in your case it is not necessary, these frameworks are not a panacea.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question