• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 52
  • Last Modified:

Detect Which Application (Web, Mobile or Touch Browser) is Loading Web Page?

If you look at the image, there are shared web pages between the 3 applications, Web, Mobile and Touch Browser. I need to report the web pages uniquely per application. So if web page A is loaded, it will need to load different JS libraries for each type of application. Currently a JS bootstrap loader file handles the logic to load the proper JS libraries but that is a 1-to-1 relationship. I now need a way to determine which application is loading the web page and load the appropriate libraries (DTM libraries but irrelevant). The solution would have to reside in the JS bootstrap loader file logic. I’m looking into using the navigator object to sniff out which type of application is requesting the web page but not sure how feasible that is? Maybe feature detection is another way but not sure how/if this would work with the applications? Any ideas?

Web Page/Application Distribution
0
894359
Asked:
894359
  • 6
  • 2
  • 2
2 Solutions
 
leakim971PluritechnicianCommented:
a similar question here, where you can fine client and server side implementation. If you already did it client side, just check the server side solution to do the same job.
0
 
894359Author Commented:
Hi Leakim971, not sure  what you mean but server-side is not an option?
0
 
894359Author Commented:
Is there a way an application can set a variable that JS on a web page can read?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
894359Author Commented:
I think location.protocol will be helpful for mobile apps but having issues getting much if any info for Touch Broswer.
0
 
Chinmay PatelEnterprise ArchitectCommented:
I am not sure if this is what you are looking for, but have you tried using :

https://github.com/lancedikson/bowser

Another way which is a bit of a hack is you could use Modernizer to detect capabilities and then determine which files to serve.

Regards,
Chinmay.
0
 
894359Author Commented:
Thanks Chinmay... I did read an article touching on this. It was old though.   http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
1
 
Chinmay PatelEnterprise ArchitectCommented:
Very interesting read 894359. I stumbled upon some other blogs as well after reading the one you have suggested.
So how about using a combination of both? Maybe try to use Bowser first and to be extra sure call Modernizer?
0
 
leakim971PluritechnicianCommented:
sorry I thought I posted a link... strange...
here the link I tried to provide on my first answer :
https://www.experts-exchange.com/questions/26728131/I-would-like-to-detect-mobile-device.html
0
 
894359Author Commented:
Thank you all for the info!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 6
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now