title: best practice for loading necessary JSON data: jquery's $(document).ready() hook? in the <HEAD> of page?
body: <p>I have been reading <a href="http://developer.yahoo.com/performance/rules.html" rel="nofollow noreferrer">Yahoo's Best Practices For Speeding Up Your Website</a>, but still have a question that I could really use your help with: </p>
  
  <p>The very first page of my web app needs to display a bunch of data that is dependent on the city the user is in. On the first visit, the user is prompted to pick her city and  I store a cookie in the browser recording which city to start with. On her following visits to the site, the Javascript code checks the cookie and retrieves the data for that city as JSON.</p>
  
  <p>Given that this data is necessary to display the fundamental part of the page, where should I load it from? Currently I am doing it from the top of Jquery's $(document).ready(), but it occurred to me that by definition that only gets executed once the entire page has loaded.</p>
  
  <p>Which is the correct way to do this? (Eg, will it improve matters if I instead put some Javascript in the  that checks for the cookie and loads the JSON feed for the right city? Some other solution...?)</p>
  
  <p>Thank you for any insight</p>
  
  <p>lara</p>