Simple page buffering technology (1) _ PHP Tutorial

Source: Internet
Author: User
Simple page buffering technology (1 ). The preface is actually a technology, maybe not a real technology. This is just a page processing method I have come up with. of course, it may be consistent with others' ideas. However, I would also like to explain
It is actually a technology, maybe not a real technology. This is just a page processing method I have come up with. of course, it may be consistent with others' ideas. But I still want to give it a nice name. So what is the page buffer I refer to here? This means to save the dynamically generated page for the next use. In this way, the next access may not need to be dynamically generated. Just like providing a cache. On my website, maybe the same is true for your website. with technologies such as templates, the pages you see are dynamically generated. However, if a page is like this for you and others, it will not change for a period of time, isn't it better to directly return the result generated last time to the user who accessed the next time? This reduces the generation time and is more efficient. I think with the development of the website, the speed and efficiency issues still need to be considered. Here I will provide my implementation, hoping to help you. There is no specific implementation.
Usage conditions
Is it best to use all webpages? I don't want it, and it's impossible. The reason for buffering is that the content of the next access and the last access may be exactly the same. Therefore, it is not suitable for frequently changing pages. For example, it is not appropriate to display the count information on the page. In addition, if your dynamic page output is not first output to the variable, but directly returned to the user, such as echo, print, readfile, I personally don't think it can be done yet. Because I cannot get the output result and save it to the file (I thought for a long time that I didn't come up with anything to cut the output and redirect it to the file ). The appropriate processing of dynamic pages is that the output results can be put into a string. Therefore, the conditions are as follows:



Actually, token is a technology. maybe it cannot be a real technology. This is just a page processing method I have come up with. of course, it may be consistent with others' ideas. But I still...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.