Performance: HTTPS and SSL certificates
MEDIUM IMPACT
This affects the initial page load speed by adding encryption overhead and impacts the security of data transfer.
const https = require('https'); const fs = require('fs'); const app = require('./app'); const options = { key: fs.readFileSync('key.pem'), cert: fs.readFileSync('cert.pem') }; https.createServer(options, app).listen(443);
const http = require('http'); const app = require('./app'); http.createServer(app).listen(80);
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| HTTP (no SSL) | No impact | No impact | No impact | [X] Bad for security |
| HTTPS with SSL certificate | No impact | No impact | No impact | [OK] Good for security with small load delay |