با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این قانون زمانی فعال می شود که PageSpeed Insights تشخیص دهد که منابع قابل تراکم بدون فشرده سازی gzip ارائه شده اند.
بررسی اجمالی
همه مرورگرهای مدرن از فشردهسازی gzip برای همه درخواستهای HTTP پشتیبانی میکنند و بهطور خودکار مذاکره میکنند. فعال کردن فشردهسازی gzip میتواند اندازه پاسخ انتقالیافته را تا ۹۰ درصد کاهش دهد که میتواند به میزان قابل توجهی زمان دانلود منبع را کاهش دهد، مصرف داده را برای مشتری کاهش دهد و زمان اولین رندر صفحات شما را بهبود بخشد. برای کسب اطلاعات بیشتر به فشرده سازی متن با GZIP مراجعه کنید.
توصیه ها
پشتیبانی فشرده سازی gzip را در وب سرور خود فعال و آزمایش کنید. پروژه HTML5 Boilerplate شامل فایل های پیکربندی نمونه برای همه محبوب ترین سرورها با نظرات دقیق برای هر پرچم و تنظیمات پیکربندی است: سرور مورد علاقه خود را در لیست پیدا کنید، بخش gzip را جستجو کنید و تأیید کنید که سرور شما با تنظیمات توصیه شده پیکربندی شده است. از طرف دیگر، با مستندات مربوط به وب سرور خود در مورد نحوه فعال کردن فشرده سازی مشورت کنید:
PageSpeed Insights گزارش می دهد که بسیاری از فایل های محتوای ثابت من نیاز به gzip دارند، اما من وب سرور خود را طوری پیکربندی کرده ام که این فایل ها را با استفاده از فشرده سازی gzip ارائه دهد. چرا PageSpeed Insights فشرده سازی را تشخیص نمی دهد؟
سرورهای پروکسی و نرمافزارهای ضد ویروس میتوانند فشردهسازی را هنگام بارگیری فایلها در دستگاه مشتری غیرفعال کنند. نتایج PageSpeed Insights بر اساس هدرهایی است که در واقع به کلاینت شما بازگردانده شده اند، بنابراین اگر تجزیه و تحلیل را بر روی یک ماشین کلاینت که از چنین نرم افزار ضد ویروسی استفاده می کند یا پشت یک سرور پروکسی میانی قرار دارد اجرا می کنید (بسیاری از پراکسی ها شفاف هستند، و حتی ممکن است از مداخله یک پروکسی بین مشتری و وب سرور خود آگاه نباشید)، ممکن است علت این مشکل باشند.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThis documentation applies to a deprecated version of PageSpeed Insights (v4) and will be shut down soon; users should refer to the latest version (v5).\u003c/p\u003e\n"],["\u003cp\u003eThe primary focus of this document is to explain how enabling GZIP compression can significantly improve website performance by reducing file sizes.\u003c/p\u003e\n"],["\u003cp\u003ePageSpeed Insights may report compression issues due to interference from proxy servers or anti-virus software affecting the headers returned to the client.\u003c/p\u003e\n"],["\u003cp\u003eModern browsers inherently support GZIP compression, so enabling it on your web server is crucial for optimization.\u003c/p\u003e\n"],["\u003cp\u003eThis page offers guidance and links to resources on how to enable GZIP compression for various web servers like Apache, Nginx, and IIS.\u003c/p\u003e\n"]]],["PageSpeed Insights flags resources served without `gzip` compression, which can reduce response size by up to 90%. Modern browsers support `gzip`, improving download time and data usage. To resolve this, enable and test `gzip` on your server, using tools like `mod_deflate` for Apache, `ngx_http_gzip_module` for Nginx, or configure HTTP compression in IIS. Proxy servers or anti-virus software can interfere with compression, impacting PageSpeed Insights' results.\n"],null,["# Enable Compression\n\n| **Deprecated** . This page was written for version 4 of the PageSpeed Insights API, which is deprecated and will be shut down in May 2019. [Version 5](/speed/docs/insights/v5/get-started) is the latest and provides both real-world data from the Chrome User Experience Report and lab data from Lighthouse.\nThis rule triggers when PageSpeed Insights detects that compressible resources were served without `gzip` compression.\n\n### Overview\n\nAll modern browsers support and automatically negotiate `gzip` compression for all HTTP requests. Enabling `gzip` compression can reduce the size of the transferred response by up to 90%, which can significantly reduce the amount of time to download the resource, reduce data usage for the client, and improve the time to first render of your pages. See [text compression with GZIP](/web/fundamentals/performance/optimizing-content-efficiency/optimize-encoding-and-transfer#text-compression-with-gzip) to learn more.\n\n### Recommendations\n\nEnable and test gzip compression support on your web server. The HTML5 Boilerplate project contains [sample configuration files](https://github.com/h5bp/server-configs) for all the most popular servers with detailed comments for each configuration flag and setting: find your favorite server in the list, look for the `gzip` section, and confirm that your server is configured with recommended settings. Alternatively, consult the documentation for your web server on how to enable compression:\n\n- Apache: Use [mod_deflate](http://httpd.apache.org/docs/current/mod/mod_deflate.html)\n- Nginx: Use [ngx_http_gzip_module](http://nginx.org/en/docs/http/ngx_http_gzip_module.html)\n- IIS: [Configure HTTP Compression](http://technet.microsoft.com/en-us/library/cc771003(v=WS.10).aspx)\n\nFAQ\n---\n\nPageSpeed Insights reports that many of my static content files need to be gzipped,\nbut I have configured my web server to serve these files using gzip compression.\nWhy is PageSpeed Insights not recognizing the compression?\n:\n Proxy servers and anti-virus software can disable compression when files are downloaded to a\n client machine. PageSpeed Insights' results are based on headers that were actually returned\n to your client, so if you are running the analysis on a client machine that is using such\n anti-virus software, or that sits behind an intermediate proxy server (many proxies are\n transparent, and you may not even be aware of a proxy intervening between your client and\n web server), they may be the cause of this issue.\n\n\nFeedback\n--------\n\nWas this page helpful? \nYes Great! Thank you for the feedback. If you have a specific, answerable question about using PageSpeed Insights, ask the question in English on [Stack\n| Overflow](https://stackoverflow.com/questions/tagged/pagespeed-insights). For general questions, feedback, and discussion, start a thread in the [mailing list](https://groups.google.com/forum/#!forum/pagespeed-insights-discuss).\nNo Sorry to hear that. If you have a specific, answerable question about using PageSpeed Insights, ask the question in English on [Stack\n| Overflow](https://stackoverflow.com/questions/tagged/pagespeed-insights). For general questions, feedback, and discussion, start a thread in the [mailing list](https://groups.google.com/forum/#!forum/pagespeed-insights-discuss)."]]