فشرده کردن اطلاعات ...
 
آگاه‌سازی‌ها
پاک‌کردن همه

فشرده کردن اطلاعات خروجی


ارسال‌: 551
شروع کننده موضوع
(@rezaei)
Honorable Member
عضو شده: 9 سال قبل

کد زیر باعث میشه که خروجی اطلاعات خودتونو به صورت قابل توجهی فشرده کنید !
این کد رو در فایل htaccess قرار بدهید!

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
1 پاسخ
ارسال‌: 143
(@wp4all)
Estimable Member
عضو شده: 8 سال قبل

من کد های بالا +
کد های زیر رو استفاده کردم و تو سایت زیر تست کردم gzip رو زده غیر فعال !

http://www.gidnetwork.com/tools/gzip-test.php

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

AddOutputFilterByType
 DEFLATE text/html text/plain text/xml application/xml 
application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
# END WordPress
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]



SetOutputFilter DEFLATE


# END WordPress

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# BEGIN Compress text files


SetOutputFilter DEFLATE



# END Compress text files
# BEGIN Expire headers

ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"


# END Expire headers
# BEGIN Cache-Control Headers


Header set Cache-Control "max-age=2592000, public"



Header set Cache-Control "max-age=604800, public"



Header set Cache-Control "max-age=216000, private"


Header set Cache-Control "max-age=600, private, must-revalidate"



# END Cache-Control Headers
# BEGIN Turn ETags Off

Header unset ETag

FileETag None

# END Turn ETags Off

Header set Connection keep-alive




Header append Vary: Accept-Encoding



# BEGIN Remove Last-Modified Header

Header unset Last-Modified


# END Remove Last-Modified Header
# END WordPress
پاسخ
اشتراک: