webcompat / web-bugs

A place to report bugs on websites.
https://webcompat.com
Mozilla Public License 2.0
742 stars 65 forks source link

lohaco.jp - desktop site instead of mobile site #938

Closed karlcow closed 6 years ago

karlcow commented 9 years ago

URL: http://lohaco.jp Browser / Version: Firefox 39.0 Operating System: Android Problem type: Desktop site instead of mobile site

Steps to Reproduce 1) Navigate to: http://lohaco.jp

Expected Behavior: Get the mobile content.

Actual Behavior: We receive the desktop content. Just a matter of UA detection probably server side. Having a version number on Android would not solve the issue.

When faking Chrome UA, we receive the mobile site which is working accordingly to the site. No issues detected.

country: jp

hallvors commented 9 years ago

There's javascript-based sniffing in common.js, look for

function whichUa(){
.
.
function isMobile(userAgent){

etc.

miketaylr commented 9 years ago

I think there's more to it than the common.js sniffing. Those methods doesn't even exist in the common.js that Chrome Mobile is served. And there's two extra sp/js scripts for them as well.

Spoofing as Chrome Mobile ($CHRM):

🐓 http http://lohaco.jp/ User-Agent:"$CHRM" | grep import_sp
<link href="//askul.c.yimg.jp/resource/common/css/import_sp.css?246417401357781" rel="stylesheet">

That stylesheet doesn't exist for Firefox for Android user agents. It appears there's some kind of device detection framework in the backend (like WURFL) that is looking for very specific UAs. Even messing with our own UA string throwing in various iPhone or AppleWebKit tokens doesn't have an effect.

I would recommend we reach out to lohaco and ask that they send us to the mobile site.

karlcow commented 9 years ago

@kudodo This one has not been contacted yet. Maybe Yahoo! Japan knows someone at Lohaco and/or Askul.

kudodo commented 9 years ago

@karlcow, this is operated by yahoo and Askul. Therefore I've asked yahoo about the issue.

karlcow commented 9 years ago

Thanks :+1: Switching to sitewait.

karlcow commented 8 years ago

This has not been fixed. Candidate for UA override. And/or @kudodo recontacting Yahoo! about it.

karlcow commented 8 years ago

added to https://bugzilla.mozilla.org/show_bug.cgi?id=gofaster

karlcow commented 8 years ago

@yahoojapan is on GitHub.

Maybe @kazuhiro4949 or @fmy could help us find the right contacts at Lohaco. People in charge of the front-end. So they can fix the client side user-agent sniffing.

MDTsai commented 7 years ago

I receive mobile version using Firefox mobile 54 today. Close as fixed. firefox

karlcow commented 7 years ago

oooh very good news. I need to check the other Yahoo! web site. Thanks the Yahoo Japan team.

MDTsai commented 7 years ago

Sorry, not check the ua-update.json.in, reopen it

karlcow commented 7 years ago

So this is not fixed. Just to remember for future testers. There is a UA override in https://hg.mozilla.org/mozilla-central/raw-file/tip/mobile/android/app/ua-update.json.in

to deactivate it, you need to flip this to false. about:config?filter=general.useragent.site_specific_overrides

softvision-oana-arbuzov commented 6 years ago

I'm no longer able to reproduce this issue. I get the mobile version regardless of the UA override (true/false).

Tested with: Browser / Version: Firefox Mobile Nightly 58.0a1 (2017-11-05) Operating System: LG G5 (Android 7.0) - Resolution 1440 x 2560 pixels (~554 ppi pixel density)

screenshot-1509964045022

Considering the above this issue will be closed.