I started noticing extra line feeds showing up at the beginning of some html text that was being written to a textarea field in an AJAX callback.
document.getElementById("myTextAreaField").value = content;
The "content" is anything that the requested php file echoed or printed. In my case, the filed included many files, none of which printed or echoed anything outside of a function. Very strange.
I eventually traced the problem to extra line feeds at the bottom of my php files after the ?>
If there was more than one line feed after the ?>, it was added to the response that showed up in the "content" of the callback. I guess it makes sense; once you are outside of the ?> you are back in raw html.