Static-how to display the latest news on PHP static pages

Source: Internet
Author: User
For example, I have a static page based on the phpcms system. The page is a news content page. I want to create a "Latest News" module, because it is a static page that cannot display the latest articles in time, I have several ideas: 1. frequent full-site generation of all pages, but too troublesome and time-consuming 2. use an iframe to reference... for example, I have a static page based on the phpcms system. The page is a news content page. I want to create a "Latest News" module, because it is a static page that cannot display the latest articles in time, I have several ideas: 1. frequent full-site generation of all pages, but too troublesome and time-consuming 2. reference a dynamic page with an iframe. This dynamic page displays the latest news 3. use ajax to request the latest news

What is the general practice or a better solution? Don't hesitate to enlighten me!

Example: http://www.dayecn.com/science/2244.html

Reply content:

For example, I have a static page based on the phpcms system. The page is a news content page. I want to create a "Latest News" module, because it is a static page that cannot display the latest articles in time, I have several ideas: 1. frequent full-site generation of all pages, but too troublesome and time-consuming 2. reference a dynamic page with an iframe. This dynamic page displays the latest news 3. use ajax to request the latest news

What is the general practice or a better solution? Don't hesitate to enlighten me!

Example: http://www.dayecn.com/science/2244.html

Http://news.sina.com.cn/c/2015-02-28/024431550484.shtml
I read the popular blog on the Right of Sina news and used ifrmae.

Essentially, different cache policies coexist.

Script: src embedding is another solution

Iframe is basically a disaster that should be eliminated.
Ajax code is relatively complex and the speed is lower than that of script: src (requests are sent only after js is run). It is not recommended.

The remaining scripts: src and static generation have their own advantages. See the situation (in fact, they can be combined. The script: src link can be another static production content ......)

Ssi

Shtml

Pls google it !~

So troublesome
Include 'your _ latest_news.file ';
Then, how long does the cron job generate the your_latest_news.file?

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.