Dynamic Site
Definition
A website that generates pages on-demand using databases and server-side code. Content can change based on user, time, or other factors.
What is a Dynamic Site?
A dynamic site generates pages in real-time when visitors request them. Instead of serving pre-built files, the server runs code, queries databases, and assembles the page on each visit.
WordPress, Shopify, and most web applications are dynamic sites. The content you see can change based on who you are, what time it is, or actions you've taken.
How Dynamic Sites Work
- Visitor requests a page
- Server receives the request
- Server-side code (PHP, Python, etc.) runs
- Database is queried for content
- Page is assembled and sent to visitor
This happens in milliseconds, but it's more work than simply sending a file.
Dynamic vs Static Sites
| Factor | Dynamic Site | Static Site |
|---|---|---|
| Speed | Depends on server/database | Very fast |
| Content updates | Instant | Requires rebuild |
| Personalisation | Yes | Limited |
| User accounts | Yes | No |
| Security | More attack vectors | Very secure |
| Hosting cost | Higher | Lower or free |
When You Need a Dynamic Site
User-Generated Content
- Forums and communities
- Reviews and comments
- Social features
E-commerce
- Shopping carts
- Order processing
- Inventory management
Personalisation
- User dashboards
- Saved preferences
- Recommendations
Real-Time Data
- Stock prices
- Booking availability
- Live feeds
Performance Considerations
Dynamic sites can be slow if not properly optimised. Common solutions include:
- Caching – storing generated pages temporarily
- CDN – serving cached content from edge servers
- Database optimisation – faster queries
- Server resources – more powerful hosting
Many modern sites use a hybrid approach – static pages where possible, dynamic features where needed.