YSlow: Use GET for AJAX requests More Recommendations

Rule Summary

JS
Low
Moderate
99%

Overview

Use GET rather than POST to collate headers and data.

How does your site score on this rule?

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.

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

Contribute to this recommendation

Have an opinion, link, or other contribution to share regarding this recommendation? Share it with us and help make the web a faster place!