این قانون زمانی فعال میشود که PageSpeed Insights تشخیص دهد که شما بیش از یک تغییر مسیر از URL داده شده به صفحه فرود نهایی دارید.
بررسی اجمالی
تغییر مسیرها یک چرخه درخواست-پاسخ HTTP اضافی را راه اندازی می کند و رندر صفحه را به تاخیر می اندازد. در بهترین حالت، هر تغییر مسیر یک رفت و برگشت (درخواست پاسخ HTTP) را اضافه می کند، و در بدترین حالت ممکن است چندین رفت و برگشت اضافی برای انجام جستجوی DNS، دست دادن TCP و مذاکره TLS علاوه بر درخواست HTTP اضافی ایجاد کند. چرخه پاسخ در نتیجه، شما باید استفاده از تغییر مسیرها را برای بهبود عملکرد سایت به حداقل برسانید.
در اینجا چند نمونه از الگوهای تغییر مسیر آورده شده است:
example.com از طراحی وب پاسخگو استفاده می کند، نیازی به تغییر مسیر نیست - سریع و بهینه!
example.com → m.example.com/home - جریمه چند رفت و برگشت برای کاربران تلفن همراه.
example.com → www.example.com → m.example.com - تجربه موبایل بسیار کند.
توصیه ها
اصول طراحی واکنشگرا را بیاموزید تا یک تجربه عالی در چند دستگاه ارائه دهید و تغییر مسیرهای غیر ضروری را حذف کنید.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["This PageSpeed Insights rule flags pages with multiple redirects, as they negatively impact performance by adding extra HTTP request-response cycles and delaying page rendering."],["Redirects can significantly slow down a website, especially on mobile devices, by introducing additional roundtrips for DNS lookups, TCP handshakes, and TLS negotiations."],["Responsive web design is recommended to avoid redirects and provide a seamless multi-device experience."],["If redirects are necessary, follow guidelines for proper implementation and user-agent detection."],["This documentation refers to a deprecated version of the PageSpeed Insights API; the latest version (v5) offers real-world and lab data for more comprehensive insights."]]],["The content explains that multiple redirects slow down page rendering due to added HTTP request-response cycles and potential DNS lookups, TCP handshakes, and TLS negotiations. It recommends minimizing redirects and using responsive design to avoid them. When redirects are required, users should consult guidelines on redirects and user-agent detection. The document also notes that PageSpeed Insights version 4 is deprecated, and version 5 should be used instead. Lastly, it guides users to Stack Overflow and a mailing list for feedback.\n"]]