Shave a line.
Slightly simplify $.ajax.
Use xhr.responseType = 'document'.