Order Allow,Deny
Deny from all
Order Allow,Deny
Deny from all
Order Allow,Deny
Deny from all
########################################################################
## PERFORMANTA (P1) - compresie + cache pe statice. Adaugat de refactor.
## Toate blocurile sunt gardate cu : daca un modul nu e activ
## pe server, Apache ignora blocul (nu da Error 500).
########################################################################
## 1. Compresie GZIP - reduce dimensiunea textelor transferate (HTML/CSS/JS)
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml
AddOutputFilterByType DEFLATE application/javascript application/x-javascript text/javascript
AddOutputFilterByType DEFLATE application/json application/xml
AddOutputFilterByType DEFLATE image/svg+xml
# Browsere vechi (proxy-uri care strica compresia)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Nu comprima imaginile deja comprimate (gif/jpg/png sunt deja compresate)
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico|webp)$ no-gzip dont-vary
## 2. Cache in browser - staticele nu se re-descarca la fiecare vizita
ExpiresActive On
# Imagini: 30 zile (se schimba rar)
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/webp "access plus 30 days"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType image/svg+xml "access plus 30 days"
# CSS / JS: 7 zile (se pot schimba la update-uri de joc)
ExpiresByType text/css "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
# HTML si JSON: fara cache (continut dinamic de joc)
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
## 3. Cache-Control headers (completeaza Expires; unele CDN-uri le prefera)
# Statice: cache public 30 zile
Header set Cache-Control "public, max-age=2592000"
# Paginile dinamice de joc: niciodata cache-uite
Header set Cache-Control "no-cache, no-store, must-revalidate"
## 4. Dezactiveaza ETag global (Expires/Cache-Control sunt suficiente)
Header unset ETag
FileETag None