Recommendations

Lighthouse
Metrics
Audits
PageSpeed (Legacy)
YSlow (Legacy)

YSlow: Use GET for AJAX requests

Overview

Use GET rather than POST to collate headers and data.

How does your site score on this recommendation?

Details from Yahoo!

When using the XMLHttpRequest object, the browser implements POST in two steps:

  1. send the headers, and..
  2. send the data.

It is better to use GET instead of POST since GET sends the headers and the data together (unless there are many cookies). IE's maximum URL length is 2 KB, so if you are sending more than this amount of data you may not be able to use GET.

Summary

JS
Low
Moderate
100%

YSlow recommends:

An interesting side effect is that POST without actually posting any data behaves like GET. Based on the HTTP specs, GET is meant for retrieving information, so it makes sense (semantically) to use GET when you're only requesting data, as opposed to sending data to be stored server-side.

Read More

Cookie Policy

By clicking "Allow All" you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View cookie details

Deny Allow All
×