Device Detection With Devicedetect.js In Salesforce

A good responsive design in UI can render behaviour across different screen sizes. Though there are few edge cases in Salesforce development, especially where you want to redirect traffic to a mobile-specific page, detect the device and even detect Salesforce1 Application itself.

You can probably do this with the help of a library known as DeviceDetect.js Inspired by isMobile.js. Upload it as a static Resource and then refer it in your Visualforce Page.<apex:includeScript value="{!URLFOR($Resource.DeviceDetect, '/js/deviceDetect.min.js')}" />