Home traffic is very large, if the general dynamic loading data in the form of the corresponding user each time the access, read data data, the overhead is very large, resulting in lower page access speed, so the data pre-brushed into the Redis server. (not made into a static page brush into the cache)
When the user accesses the WWW server, the Redis data is transferred from PHP, where Redis provides data as a response server, and MySQL is stored as a data store. Timed by script to read data, brush into Redis.
When the page is rendered, lazy loading is used.
Lazy Loading (load on Demand) is a unique and powerful method of data acquisition, which can automatically get more data when the user scrolls the page, while the new data will not affect the display of the original data, and minimize the resource consumption on the server side.
The disadvantages of the homepage of the current website:
1. Brush into home Redis data is the entire home page data, and does not do paging processing, that is, when the user visits the home page is from Redis read all the data to render.
2. For less updated floors, and not made into a static page input in Redis,
3. Floor data information and background update a certain time difference (currently cannot be resolved)
Planning:
1. First page data is brushed into Redis before paging, user access to display the first screen data, pull down, asynchronous request paging data.
2. For a floor module that is not longer updated, make a static page input to Redis.
Optimization of website----Homepage Optimization---existing homepage