title: How to protect sensitive data when using jQuery, AJAX and web services
body: <p>We have quite a unique database, we have been putting it together for over 12 months and I wonder wha the common techniques and processes are to protect this data when using web services and AJAX.</p>
  
  <p>We are using .NET 4.0, jQuery 1.6 and C# for web services.</p>
  
  <p>I wonder what are the best techniques to protect your code and database from stealing data.</p>
  
  <p><strong>1. How do I make sure that database replies with records only to requests from our page?</strong></p>
  
  <ul>
  <li>Is it possible to block requests from external JS and Ajax requests? </li>
  <li>Do we need to generate some session with hash with secret key, so only we know whether hash is valid</li>
  <li>we need to stop robots from going through all the <code>&lt;select&gt;</code> in html filter combinations, we can't afford someone to develop robot which will automatically read all combinations and save results to database</li>
  </ul>
  
  <p><strong>2. What is the best way to minify and confuscate JS code, to make it as difficult as possible for others to decode?</strong></p>
  
  <p>Thank you.</p>