Is there any way to detect the browser features like History API, localStorage, etc on first request received from client on server so that I could customize the response page data as per the browser features?
I know how to do it while page is loaded(I do it using Modernizr JS library).
You could set a cookie on the first page load. If said cookie does not exist, check for features. Pseudo: