title: handle direct url with history api in asp.mvc
body: <p>I have my site like  <a href="http://mysite.com/" rel="nofollow">http://mysite.com/</a> and on the index page i have search box and for the result i am using jqgrid. When user click row in the jqgrid row I am taking data from cells and do ajax call to server and fetch json data and once data arrived I hide the search box and jqgrid and show another div which is I kept for result. In short, user will be on the same page just div's hide/show.</p>
  
  <p>Now I have seen history api and used pushState and popstate so my url becomes in the addressbar like <a href="http://mysite.com/controller/action/para1/para2" rel="nofollow">http://mysite.com/controller/action/para1/para2</a> (here para1 and para2 are the parameters i am passing to action). Everything is ok so far.</p>
  
  <p>Now the problem is if I copy this URL "<a href="http://mysite.com/controller/action/para1/para2" rel="nofollow">http://mysite.com/controller/action/para1/para2</a>" and if I open this with let's say different browser and hit enter it display just json data. So, I am confused that how to handle when user directly use that url in controller. </p>
  
  <p>I was thinking to check in the controller action if the request is AJAX then return json data otherwise full page, is that right approach? OR something on the client side we have so that it load the same way as earlier.</p>
  
  <p>Thanks</p>