New plans for alriyadh.com
By Rayed
When I started building alriyadh.com website I decided to generate all pages as static HTML files, I relied heavily on Server Side Includes (SSI) to build complex pages.
The main reason for this decision was the fact that the server was very slow on processing PHP files, espcially with a site with high load.
Generating static HTML files has its advantages but it also had many problems:
- Regenerate everytime you want to test a change
- Changing the design will cause regenrating the whole website, which could take forever.
- Generating complex pages is very hard, I had to rely on SSI.
- What to do with pages that change frequently, e.g. pages with comments.
- When importing old data, you need to generate them as well.
- Static HTML files performance advantage for frequently used data, like todays issue, but for old issues it just take a lot of disk space.
Soon I’ll start testing dynamicly generated of pages with these points in mind:
- Use mod_rewrite to keep the userfriendly urls, i.e. instead of “section.php?id=4&issue=3424” it will be “/2005/08/04/section.main.html”, it wil still use PHP and generate it on demand.
- Use caching to improve performance and decrease load.
- Utlize PHPAccelerator to improve PHP performance.