Is it possible to detect if the user is accessing through the browser or application using JavaScript?
I’m developing a hybrid application to several mobile OS through a web page and a PhoneGap application and the goal would be to:
- Use the same code independently of the deployment target
- Add PhoneGap.js file only when the user agent is an application
You could check if the current URL contains
httpprotocol.