var sTime $.ajax({ url: "/time.php", cache: false, success: function(data){ sTime = data; console.log(sTime); } }); console.log(sTime); // пусто!!! <===