ورود

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : ارور Leverage browser caching در وبسایت gtmetrix.com



kianesfahan
June 23rd, 2018, 16:24
سلام و درود دوستان .

وقت بخیر .

در وبسایت gtmetrix.com که میخواهیم سایتمان را انالیز کنیم اروری در مورد Leverage browser caching نمایش داده میشود .

ما کد زیر را در فایل .htaccess قرار دادیم اما وقتی باز هم انالیز میکنیم باز هم به همان مورد ایراد میگرد :




## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType favicon.ico "access plus 1 year"
ExpiresByType wp-content/fonts/font-bmi/font-bmi.woff "access plus 1 year"
ExpiresByType wp-content/fonts/yekan-joom/yekan-joom.woff "access plus 1 year"
ExpiresByType wp-content/themes/kallyas-PURCHASHED-4.15/template_helpers/icons/glyphicons_halflingsregular/glyphicons_halflingsregular.woff2 "access plus 1 year"
ExpiresByType wp-content/themes/kallyas-PURCHASHED-4.15/template_helpers/icons/kl-social-icons/kl-social-icons.woff "access plus 1 month"
ExpiresByType wp-content/uploads/zn_fonts/icomoon/icomoon.woff "access plus 1 month"
ExpiresDefault "access plus 2 days"
## EXPIRES CACHING ##


کد ما جایش مشکل دارد ؟

ممنون میشم دوستان راهنمائی کنند .

kianesfahan
June 24th, 2018, 09:24
از دوستان کسی نیست راهنمائی کند ؟

1eng.ir
June 24th, 2018, 10:02
اگه اشتباه نکنم شما باید بصورت Mime type ست کنید.

wp-content/fonts/font-bmi/font-bmi.woff به این صورت که آدرس فونت رو دادید بعید میدونم اعمال بشه :d

مورد بعدی هم اینکه شما تگ ماژول مود اکسپایر رو نذاشتید
<IfModule mod_expires.c>
</IfModule>

بصورت زیر تنظیم کنید ببینید درست میشه یا نه

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>

kianesfahan
June 24th, 2018, 10:12
اگه اشتباه نکنم شما باید بصورت Mime type ست کنید.

wp-content/fonts/font-bmi/font-bmi.woff به این صورت که آدرس فونت رو دادید بعید میدونم اعمال بشه :d

مورد بعدی هم اینکه شما تگ ماژول مود اکسپایر رو نذاشتید
<IfModule mod_expires.c>
</IfModule>

بصورت زیر تنظیم کنید ببینید درست میشه یا نه

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>

ممنون دوست عزیز . اما این کد اماده توی اینترنت هست .

اما توی انالیز به سایت ما برای فونت ها ایراد گرفته است .

برای این موضوع باید چیکار کنیم ؟
م

1eng.ir
June 24th, 2018, 10:19
ExpiresByType application/x-font-woff "access plus 1 year"


باید Mime type فونت‌ها رو پیدا کنید و بذارید توی htaccess

اگه این کد کار نکرد بصورت font/woff و font/woff2 بذارید.

kianesfahan
June 24th, 2018, 10:30
ExpiresByType application/x-font-woff "access plus 1 year"


باید Mime type فونت‌ها رو پیدا کنید و بذارید توی htaccess

اگه این کد کار نکرد بصورت font/woff و font/woff2 بذارید.

ممنون .

فقط لطف میکنی کد کاملش را برام بفرستی ؟ قبل و بعدش چی باید باشد ؟

1eng.ir
June 24th, 2018, 10:32
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>

اینو بزن

سوال: وب سرورت چیه؟

kianesfahan
June 24th, 2018, 12:04
سلام و درود .

ممنون .

الان به این موارد ایراد میگیرد :



connect.facebook.net/en_US/sdk.js (20 minutes)
com/favicon.ico (2 days)
wp-content/themes/kallyas-PURCHASHED-4.15/template_helpers/icons/glyphicons_halflingsregular/glyphicons_halflingsregular.woff2 (2 days)


نکته جالب اینجاست که اصلا فایل فایوایکون به ادرس وجود ندارد در سرور ما :

sitename.com/favicon.ico

1eng.ir
June 24th, 2018, 12:43
لینک gtmetrix رو بده ببینم چشه

kianesfahan
June 24th, 2018, 13:42
لینک gtmetrix رو بده ببینم چشه

ممنون .

لطف میکنید ادرس تلگرام تان را بفرمائید تا اونجا صحبت کنیم ؟

1eng.ir
June 24th, 2018, 22:51
ممنون .

لطف میکنید ادرس تلگرام تان را بفرمائید تا اونجا صحبت کنیم ؟

Email: 8766 at pm dot me

IGulf
July 26th, 2018, 18:31
لینک gtmetrix رو ارسال کنید برسیش کنم خدمتتون