• 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
اکسپایر کردن هدر
#1
با سلام دوستان عزیز
من میخواستم تعداد درخواست های سرور را کاهش بدم .
میخواهم چند درخواست که لود کردن فونت هستند را اکسپایر کنم
لطفا تجربتون رو به اشتراک بزارین . در فایل htacces چه کدی بگذارم ؟


everage browser caching for the following cacheable resources:
https://www.19kala.com/catalog/view/them...icons.woff (expiration not specified)
https://www.19kala.com/catalog/view/them...sWeb.woff2 (expiration not specified
  پاسخ
تشکر شده توسط :
#2
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 week"

# CSS

ExpiresByType text/css "access plus 1 week"

# Data interchange

ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rdf+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"

ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/ld+json "access plus 0 seconds"
ExpiresByType application/schema+json "access plus 0 seconds"
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"

# Favicon (cannot be renamed!) and cursor images

ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"

# HTML

ExpiresByType text/html "access plus 0 seconds"

# JavaScript

ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"

# Manifest files

ExpiresByType application/manifest+json "access plus 1 week"
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"

# Media files

ExpiresByType audio/ogg "access plus 1 week"
ExpiresByType image/bmp "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/svg+xml "access plus 1 week"
ExpiresByType image/webp "access plus 1 week"
ExpiresByType video/mp4 "access plus 1 week"
ExpiresByType video/ogg "access plus 1 week"
ExpiresByType video/webm "access plus 1 week"

# Web fonts

# Embedded OpenType (EOT)
ExpiresByType application/vnd.ms-fontobject "access plus 1 week"
ExpiresByType font/eot "access plus 1 week"

# OpenType
ExpiresByType font/opentype "access plus 1 week"

# TrueType
ExpiresByType application/x-font-ttf "access plus 1 week"

# Web Open Font Format (WOFF) 1.0
ExpiresByType application/font-woff "access plus 1 week"
ExpiresByType application/x-font-woff "access plus 1 week"
ExpiresByType font/woff "access plus 1 week"

# Web Open Font Format (WOFF) 2.0
ExpiresByType application/font-woff2 "access plus 1 week"

# Other

ExpiresByType text/x-cross-domain-policy "access plus 1 week"

</IfModule>
می تونید از کد استفاده کنید
  پاسخ
تشکر شده توسط :


پرش به انجمن:


کاربران در حال بازدید این موضوع: 1 مهمان