Overview
This guide covers techniques to improve your website performance using features available in Plesk. Faster websites provide better user experience and improved search engine rankings.
Enable Compression
Compression reduces the size of files sent to browsers, speeding up page loads.
Enable GZIP Compression:
- Log in to Plesk
- Go to Websites & Domains
- Select your domain
- Click Apache & nginx Settings (or Hosting Settings)
- Look for compression options
- Enable GZIP compression
Via web.config (IIS):
<system.webServer>
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
</system.webServer>
Enable Browser Caching
Tell browsers to cache static files so returning visitors load pages faster.
Add to web.config:
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
</system.webServer>
This caches static files for 7 days. Adjust as needed.
Cache Specific File Types:
<location path="css">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
</system.webServer>
</location>
Optimize Images
- Compress images before uploading (use tools like TinyPNG)
- Use correct formats: JPEG for photos, PNG for graphics, WebP for modern browsers
- Resize images to actual display dimensions
- Use lazy loading for images below the fold
Minify CSS and JavaScript
Remove unnecessary characters from code files:
- Use build tools (Webpack, Gulp) to minify during deployment
- For ASP.NET, use bundling and minification
- Online tools: CSS Minifier, JavaScript Minifier
Enable Output Caching (ASP.NET)
Cache rendered pages to reduce server processing:
// In your controller or page
[OutputCache(Duration = 3600, VaryByParam = "none")]
public ActionResult Index()
{
return View();
}
Database Optimization
- Index frequently queried columns
- Use stored procedures for complex queries
- Avoid SELECT * - retrieve only needed columns
- Implement connection pooling (default in .NET)
Content Delivery Network (CDN)
Consider using a CDN for static assets:
- Cloudflare (free tier available)
- Azure CDN
- Amazon CloudFront
CDNs serve content from servers closer to your visitors.
Reduce HTTP Requests
- Combine CSS files into one
- Combine JavaScript files into one
- Use CSS sprites for small images
- Inline critical CSS
Testing Your Performance
Free tools to measure performance:
- Google PageSpeed Insights
- GTmetrix
- Pingdom Website Speed Test
- Browser DevTools (F12) → Network tab