Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

HTTP_USER_AGENT blank on https

Hello,
  I have been trying to track down a problem that my application experiences intermittenly.  It appears that it returns blanks in the HTTP_USER_AGENT whenever it comes back from authorize.net - on https.  It always runs through the same code for every page.  That code contains a check for USER_AGENT to determine if it is a mac.  It appears that when it comes back on https that variable is blank.  Is there another method for use on https?  Or am I just stuck with a default on https?

Thanks!
JGoyer
0
JGoyer
Asked:
JGoyer
  • 2
  • 2
1 Solution
 
INSDivision6Commented:
You cannot count on HTTP_USER_AGENT.  This is optional info that, strictly speaking, is not required unless you explicitly bounce the client.  In most cases, people use JS on the client side to identify the browser and return this info with the page.  If this is something that you can't do, you have to use "generic" browser.
0
 
JGoyerAuthor Commented:
How do I use js to get that information?
0
 
INSDivision6Commented:
There are a few tricks.  First of all, in some cases the browser name is available via JS on client side.  Also, different browsers use different document models, so usually people check what is working and make decision about the browser.  See JS forums for more details.  As soon, as you know the browser, you can pass the browser type, as a hidden value across your pages and do not rely on HTTP_REFERER, which may or may not be present.
0
 
JGoyerAuthor Commented:
Thanks!  I appreciate the help.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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