Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> kompresja deflate gzip
nmts
post
Post #1





Grupa: Zarejestrowani
Postów: 283
Pomógł: 34
Dołączył: 21.03.2008

Ostrzeżenie: (0%)
-----


Włączam kompresje przez .htaccess w taki sposób:

Kod
<IfModule mod_headers.c>
    #The following line is enough for .js and .css
    #AddOutputFilter DEFLATE js css

    #The following line also enables compression by file content type, for the following list of Content-Type:s
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript

    #The following lines are to avoid bugs with some browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    <IfModule mod_headers.c>
      <FilesMatch "\.(js|css)$">
        Header append Vary: Accept-Encoding
      </FilesMatch>
    </IfModule>
</IfModule>


No i działa kompresja dla text/html czy xml ale dla text/css i javascript już nie.
Ktoś wie dlaczego?

Ten post edytował nmts 28.06.2012, 21:04:17
Go to the top of the page
+Quote Post

Posty w temacie
- nmts   kompresja deflate gzip   28.06.2012, 20:35:15


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.08.2026 - 04:14