Performance: Clickjacking protection
MEDIUM IMPACT
This concept affects page security and user interaction safety without directly impacting page load speed or rendering performance.
from django.views.decorators.clickjacking import xframe_options_deny @xframe_options_deny def my_view(request): return render(request, 'my_template.html')
from django.views.decorators.clickjacking import xframe_options_exempt @xframe_options_exempt def my_view(request): return render(request, 'my_template.html')
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| No clickjacking protection | 0 | 0 | 0 | [!] OK but insecure |
| Using @xframe_options_exempt decorator | 0 | 0 | 0 | [X] Bad - insecure |
| Using @xframe_options_deny decorator | 0 | 0 | 0 | [OK] Good - secure |
| Using XFrameOptionsMiddleware globally | 0 | 0 | 0 | [OK] Good - secure |