Use react as the front end, and php is responsible for obtaining data. Both use ajax to transfer data.
This way, after rendering the page, the user can perform subsequent operations.
However, if the first rendering page is loaded with ajax, it will feel a bit slower.
Is there any good solution?
Use react as the front end, and php is responsible for obtaining data. Both use ajax to transfer data.
This way, after rendering the page, the user can perform subsequent operations.
However, if the first rendering page is loaded with ajax, it will feel a bit slower.
Is there any good solution?
Just do a loading, or when you let PHP output the HTML, the data will also be output to the page variables. In this way, Ajax loading will be omitted for the homepage
Front-end:
When using react, do you need to use its family bucket? What kind of webpack packaging? If it’s because of pictures, see if it can be lazy loading
Without front-end, use chrome app postman to test whether simple ajax loading takes a lot of time. If so, then you need to look at the ping value of the server and whether there is anything that can be optimized in the database SQL statement and design
Solved using Relay and GraphQL. This workload is relatively large. Facebook’s open source projects are used by themselves
Add a splash screen (similar to the transition picture with the logo in the center when you just open the mobile app), or a prompt for data loading (loading...)