I just ran some random tests on my code and was shocked to discover that get_browser() read Opera as Google Chrome.
A few months ago get_browser() gave me correct results on all 5 browsers (chrome,ie,ff,opera,safari).
Today Opera displayed the same values with Google Chrome. First I thought get_browser() must be the problem so I tried getting alternatives. I saw this javascript alternative which works BUT like get_browser it also detected Opera as Google Chrome.
I made a quick search on this and found articles of Opera now using Chromium for its Desktop Browser.
Is that why my code is giving Opera and Google Chrome the same values?
I store user information for better user experience and it looks bad when my users are being told the wrong information.
Any ideas on how to keep individuality between Google Chrome and Opera?
All I can think of is using the user-agent but it can be faked.
Opera is now using Chromium/Blink as its basis. In order to solve compatibility issues, they purposely use Chrome's user-agent. Below is an example of UA string presented by Opera:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100
However, differentiation of Opera and Chrome is still possible as Opera appends its version to the user-agent as you can see above.
If you want to keep using get_browser() function of PHP, you should wait for a later release of PHP that implements detection of Opera natively. However, you can also write a function to do that job. In fact, get_browser() works by decoding the user-agent field of the headers of a HTTP request.
Related
I assume all the modern browsers now send out:
Accept-Encoding: gzip, deflate, sdch
But is that a good assumption and is there any place where I can find out more about what is accepted?
Yes, it is a good assumption, and has been for quite a few years. See this answer:
Basically every browser nowadays supports deflate/gzip. This page
lists many browsers and version numbers. Here's a summary plus some
newer browsers:
Netscape 6+ (Netscape 4-5 does, but with some bugs).
Internet Explorer 5.5+ (July 2000) and IE 4 if set to HTTP/1.1.
Opera 5+ (June 2000)
Lynx 2.6+ (some time before 1999)
Firefox 0.9.5+ (October 2001)
Chrome since forever
Safari since forever (as far as I can tell)
As you can see: for almost 15 years, there's full support, and nobody
uses a more than 15 year old browser.
I basically tried everything and searched everywhere, but I can't make google chrome "scale" at the res of 1440p. All the things (Websites as well as UI) are way to small to read and use comfortably. I tried to edit the registry, enable chrome flags that are apparently not available anymore and modify the shortcut start parameters. What am I doing wrong?
(Windows is scaled to a 125%)
(Firefox, Opera and IE scale perfectly btw)
Strange behavior.
This site: ****
Works in firefox and internet explorer, despite the insecure certificate.
But doesn't work at all in Chrome, and says ERR_CONNECTION_ABORTED
Anyone else getting this? I've tried it on 3 different computers already, and can't figure out why Chrome doesn't see it. Also, I can't get it to work on an iphone either.
How do I get this to work in all browsers, am I doing something wrong? Someone help
It is possible that Microsoft Update KB2992611 is causing the problem. See this article: http://www.infoworld.com/article/2848574/operating-systems/microsoft-botches-kb-2992611-schannel-patch-tls-alert-code-40-slow-sql-server-block-iis-sites.html
Uninstall the patch solved the problem, but I am not sure of the right steps to take to fix what the patch was intending to fix.
I can get to the site over HTTP, but not over HTTPS (tested in Chrome 38.0.2125.122 and Safari 8.0). Does this help?
I have similar problems begin lately with HTTPS pages of two websites on Win server 2012.
On most computers it works fine.
But in some computers:
In IE FF or Safari its OK,
But in Chrome or new Opera it raise error:
"This webpage is not available
The webpage at [my https url] might be temporarily down or it may have moved permanently to a new web address."
In Chrome it show also: "Error code: ERR_CONNECTION_ABORTED"
This failed requests not appear in the IIS logs.
I'm trying to make a call by using sipml5 client (http://sipml5.org/ ) or click2dial (http://click2dial.org/) on firefox 20 (Windows & OSX) but it doesn't work. When I try to make call using Chrome, it works fine on both windows & OSX. Please help me how to configure firefox to work with sipml5 or click2dial. Thank you.
WebRTC is not allowed in firefox yet. https://code.google.com/p/sipml5/wiki/Enable_WebRTC
You must use webrtc4all (Windows only) to allow this in Opera, IE and Firefox. https://code.google.com/p/webrtc4all/
I programmed a web browser. I've tried out him and on google+ wanted to say my browser would be out of date and I must have safari, chrome, firefox or ie download. How can I spend my browser as Safari or Chrome?
When sending your HTTP requests, include a User-Agent header in the request that identifies your browser as one of the ones you want.