For example, there are tens of thousands of data, paging, if each page 50, a total of thousands of pages, each page generated HTML files.
Each time you add a piece of data, you need to update the thousands of HTML to ensure that the first HTML is the most current data.
Feel too wasted, is there a better way?
Reply to discussion (solution)
Is it not the last page to generate HTML for each additional piece of data? What is your logic?
His logic is that the latest data is displayed on the first page, and the last piece of data on each page is moved to the first of the next page.
I don't think it's supposed to generate static pages, use pseudo-static, or asynchronously get data
This advice is not as static, this best made real-time, Ajax query is better, according to paging parameters, to query the 50 data
CMS system is what you say this, I understand that, although your PHP generated column page consumption of resources, but if users have 100 million or more when the benefits are very high ah, they will not occupy your PHP system and direct access to static pages. So users more so good, less users or direct pseudo-static. Our company's information site is now using the method you say, editing every time you publish the article must be generated, but the site is not a card
Is it not the last page to generate HTML for each additional piece of data? What is your logic?
I was thinking, so the last page won't be enough. 50 data.
This is a static file generation policy issue:
If you do not regenerate all of the list pages each time (with new content), just regenerate the first few pages (for example, 10 pages)
This will not need to regenerate from the original 11 page after adding 50 new content.
Of course, if the period after paging to 10 pages, may be to lose some information, but the number of browsing data (50*10) in the short term can not see is not related
You can also use dynamic pages to compensate for this missing
This is a static file generation policy issue:
If you do not regenerate all of the list pages each time (with new content), just regenerate the first few pages (for example, 10 pages)
This will not need to regenerate from the original 11 page after adding 50 new content.
Of course, if the period after paging to 10 pages, may be to lose some information, but the number of browsing data (50*10) in the short term can not see is not related
If you use this paging strategy and generate HTML per page, the number of pages displayed is not the opposite of the HTML file number.
For example, if there are 1000 pages, the first page points to page_1000.html, the second page points to page_999.html the last page point to page_1.html
There is no difference from what you originally conceived!
You're asking for a static file name, right?
You can reverse the rename in the loop.
There is no difference from what you originally conceived!
You're asking for a static file name, right?
You can reverse the rename in the loop.
Well, let's use this scheme,
Perhaps the user is careful to wonder why the first page is clicked, and the Address bar shows 1000 pages. Ha
Thank you!!!