首页 » this site

lilina静态化

Author: 唐生. Published: November 29, 2006. Category: (28)
Copyright: You are free to redistribute this work, as long as you keep this disclaimer and link.
Permlink: http://www.tonyhead.com/archives/20061129_lilina_static.html


大懒唐首页系一个lilina新闻聚合器,它会把特定的RSS FEED聚合在这里,就像其他阅读器,有一个更新时间和频率的问题。现在只有5个源,所以每次更新(默认是4小时)在服务器端并不花太多时间,我考虑的是在客户端的浏览速度,每个客户端第一次浏览服务器端都要根据时间过滤(默认48小时的POST),所以造成每一个访问都要lilina过滤内容。有的做法是include一个由事件驱动静态化过的lilina.html,调节cache生存或者客户端timeout时间。但这个空间有shell :P,以下做法可以忽略lilina在客户端缓存时间,多用户驱动更新等问题。

lilina静态化:

  1. wget -O /wwwroot/index.html http://www.tonyhead.com/index.php
  2. 利用crontab定制更新频率 1 * * * * wget -O /wwwroot/index.html http://www.tonyhead.com/index.php 得到一个每小时更新一次的html页面

完成。如果首页还要调用其他php脚本,可以修改.htaccess,加入AddType application/x-httpd-php .html,把html也交给php处理完成。

优点:静态化过程简单。
缺点:需要shell。

延伸阅读:
Lilina的简单预缓存加速
关于加快 lilina 显示速度的一些设置
为lilina增加文本预缓存支持(html cache)
SXNA更新流程



Posted by 唐生 at November 29, 2006 01:11 PM | TrackBack (0)

« RPG  Prev Next  揾工网 »
lilina静态化 相关的日志
More to do on this site
Comments



Post a comment
Name:

Email Address: (will not show)

URL: (optional)

Comments:


It may take up to 30 seconds before the server returns a result. IP address recorded.
Your post will appear on the homepage of this site - feel free to post on old entries to re-active the discussion. You can also suggest a new topic.
Remember info?

<-- Please click POST only once

Tags Cloud

blogger damco files funny Maersk Maersk Post Movable Type this site Webgame why 下载 世界第一富婆目标! 十指不沾阳春水嘅偶像 唐生揾紧工 广州 快闪 桌面游戏 电子产品 细艺 自建服务器 通式档案 魔法风云会


Archives

Archives | 通式档案 | Popular | Disclaimer | Subscribe | About | Contact | RSS rss
© 2003 - 2008 唐生 TONYHEAD.COM. All rights reserved.

 
News!
About this Site
Created: July 14, 2003
Entries: 516
Page views/month: 4 thousand
Comments: 408
Location: Canton, China
Time: UTC +08:00
Author: 唐生, ms08
Update Frequency: weekly
RSS 2.0 Feed  RSS
Google Reader 订阅
Powered by Movable Type 4.2rc4-en
Translations:English
My Picks
OS: Windows Server 2003 SE SP2
Browser: Mozilla Firefox 3.0
Email Client: Outlook 2003
FTP Client: FlashFXP
Text Editor: Maruo
Downloader: FlashGet
AntiVirus: Symantec AntiVirus
Compression Tool: 7-Zip
Image Viewer: IrfanView
Feed Reader: Google Reader
PIM: wikidPad
Web Hosting: Site5 / Sysinfo
Miniblog: Twitter
ID:claimID
Maersk UID:TYT004
Who Is Who