What is the point of jQuery ajax accepts attrib? Does it actually do anything?
问题 Spent a solid hour trying to sort out why on earth this (coffeescript) $.ajax accepts: "application/json; charset=utf-8" did absolutely nothing to change the accepts header, while this $.ajax dataType: "json" properly sets the accepts header to application/json; charset=utf-8 Totally confused, am I missing something or is the accepts attrib a year-round April Fool's joke? 回答1: As always the documentation is your friend: accepts Default: depends on DataType The content type sent in the request