Get ajax response with extra space

Get ajax response with extra space

I have write same jquery ajax function on two different pages. In one page I got  "Hi"  and another page  " Hi" . why this extra space before Hi? see my code below

  1. jQuery.ajax({
  2.  type:"POST",
  3.  data:"pid="+pid,
  4.  url:"mypage.php",
  5.  success:function(html){
  6. });
In mypage.php page

  1. echo "Hi";

I don't understand what happened ? How to get rid of it ?