Performance: Custom status codes
LOW IMPACT
Custom status codes affect how the server communicates response status to the browser, impacting how browsers handle rendering and caching.
from flask import Flask, Response app = Flask(__name__) @app.route('/') def index(): return Response('Custom error', status=450)
from flask import Flask, Response app = Flask(__name__) @app.route('/') def index(): return Response('Custom error', status=999)
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Non-standard status code (e.g., 999) | No direct DOM changes | No reflows triggered | May cause fallback paint | [X] Bad |
| Standard custom status code (e.g., 450) | No direct DOM changes | No reflows triggered | Normal paint behavior | [OK] Good |