Page: Previous  1, 2

jeffshead
Status: Curious
Joined: 21 Apr 2013
Posts: 9
Reply Quote
I'm really confused now. Please help me figure this out.

Here is the UA string from the UC Browser on the Windows phone when the browser's advanced website type setting is set to Mobile:
:: Code ::
Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; mwp6985)


Ucbrowser is not included in the UA string but when I view the "your computer" box on Techpatterns.com, it shows Ucbrowser 2.9.0.263 in the first section under Handheld device.

I created a test page that echo's every single variable that's listed in the comments of the full featured PHP browser/os detection script but it still does not show the browser as being the UC Browser when the browser's advanced website type setting is set to Mobile.

I cleared the browser's cache and restarted the browser. How is it possible that the UC Browser is detected on Techpatterns.com when it's not in the UA string and it's not detected on my site?

I can PM you a URL if you want to visit my test page. I'd rather not post the link.

FYI - I went line by line through the full featured PHP browser/os detection script and found a couple of minor errors. They are listed below:

Line 40: Number 2 is listed twice so the numbering sequence is incorrect.

Line 85: browser_name_ should be browser_name.

Line 178: Number 2 should be the number 3. This mistake was replicated on techpatterns.com/downloads/php_browser_detection.php
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3753
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
:: Code ::
Your Computer
Handheld Device:

Type: Wp v: 985
OS: Windows Phone Os 7.5
Browser: Iemobile 9.0
Operating System:

Windows
NT (version unknown)
Current Browser / UA:

User Agent: MSIE
(standard mode)
Full Version Info: 9.0
Layout Engine: Trident
Engine Version: 5.0
HTML Support

HTML 5 Basic: Good
HTML 5 Forms: None (or poor)
XHTML: Yes


I used the user agent you pasted to test the live your computer box, that is what it shows, that's all it actually could show since ucbrowser or ucweb does not appear in the useragent.

Thanks for checking the script, and finding those errors, I'll upload the fixes in a few minutes. Sometimes things are just too familiar to the eyes so you don't see them.

The array numeric index of course should have started at 0, not one, that's now fixed, as are the other glitches, and the version data as well.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3753
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
by the way, the bottom of the php browser detection script download page also shows the useragent being used at that request, so you can also confirm your actual useragent there, I think you'll find that it's not what you thought.

There's a faint possibility of browser page caching, but not if you see the same useragent in the bottom of the page listed as shows in the your computer box.
Back to top
jeffshead
Status: Curious
Joined: 21 Apr 2013
Posts: 9
Reply Quote
It must be a caching issue. Very odd though...

When I toggle the UC Browser setting (Advanced->Website type) from Desktop to Mobile and vice versa, I can see the changes when I refresh my test page, however; the changes are not reflected when I refresh the Techpatterns.com page with the "Your computer" box. Manually clearing the cache does not help either.

To see the difference on Techpatterns.com, I have to uninstall and re-install the UC browser before visiting Techpatterns.com to see the results change. I don't know why this is necessary on your site but not mine.

I created a test page that echo's all of the variables. Makes it easier for a novice such as myself. Thought maybe you might want to include it somewhere on your site to help others. I tried to add the code to this post but it must be too long because it would not display it all.

Here's the code:
codetidy.com/5391/
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3753
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I would check a variety of things to locate the caching issue.

I test the browser detection output box all the time, obviously, and there's definitely no server caching going on, but there may be some type of caching going on in ucbrowser. Your local server may send out some signal that lets the ucbrowser know to refresh.

You can verify the actual headers with firefox Live HTTP Headers extension, which is another invaluable web developer tool.

That may show you the variance in caching or something else. If I remember right techpatterns pages are served with gz compression, but I could be wrong, haven't checked in a while.

Re your test page, I would like to offer that but I would need the name you want it copyrighted to, ie, you, unless you want to donate it straight out, and generally i license stuff with the current gpl, 3 in this case, but if you have another license you prefer of course that is also fine as long as it's a technically free software license like BSD, MIT, or Mozilla.
Back to top
jeffshead
Status: Curious
Joined: 21 Apr 2013
Posts: 9
Reply Quote
The cache issue is puzzling. That's what was confusing me.

I already use the User-Agent Switcher add-on with FireFox. One thing that's missing from your import list ([link]) is IE8 on Windows XP. This is vital when testing for Server Name Indication (SNI) support since so many people still use Windows XP with IE.

I would like to donate the test page. Do with it what you will. Anyone can use it as their own.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3753
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Live HTTP Headers is the tool I mentioned, that's what you want to use to track down issues where you want to see what is actually going on between the browser and the server. You open a single browser session, no tabs, i use a new session / profile for that, then open live http headers, which opens a window where you see every request and return code from the server. then you type in the url to the page you are testing, and watch the data stream out as the chunks and steps happen.

There's a more complete thing, like wireshark, you can use but it's harder to learn, where you see the full contents of the ip packets as well.

I've updated the list to add the useragent for xp / msie 8.

Don't have time to implement the test page but I will, I'll just note in its public domain license, which is the one that corresponds to your request, that you created it, your nick that is. Don't like to take credit for other people's work. But that's a certainly useful feature I agree for debugging and development purposes.
Back to top
jeffshead
Status: Curious
Joined: 21 Apr 2013
Posts: 9
Reply Quote
UA string of current UC Browser on Android:

:: Code ::
Mozilla/5.0 (Linux; U; Android 2.3.3; en-US; LS670 Build/GRI40) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.0.1.275 U3/0.8.0 Mobile Safari/534.31

Back to top
Display posts from previous:   
Page: Previous  1, 2
All times are GMT - 8 Hours