web-bugs icon indicating copy to clipboard operation
web-bugs copied to clipboard

lohaco.jp - desktop site instead of mobile site

Open karlcow opened this issue 11 years ago • 13 comments

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

karlcow avatar Apr 21 '15 02:04 karlcow

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

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

etc.

hallvors avatar Apr 24 '15 10:04 hallvors

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.

miketaylr avatar Apr 24 '15 20:04 miketaylr

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

karlcow avatar Jun 18 '15 01:06 karlcow

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

kudodo avatar Jun 18 '15 01:06 kudodo

Thanks :+1: Switching to sitewait.

karlcow avatar Jun 18 '15 03:06 karlcow

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

karlcow avatar Feb 22 '16 01:02 karlcow

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

karlcow avatar Aug 23 '16 02:08 karlcow

@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.

karlcow avatar Aug 23 '16 02:08 karlcow

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

MDTsai avatar Feb 02 '17 07:02 MDTsai

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

karlcow avatar Feb 02 '17 07:02 karlcow

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

MDTsai avatar Feb 02 '17 07:02 MDTsai

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

karlcow avatar Feb 02 '17 07:02 karlcow

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.

softvision-oana-arbuzov avatar Nov 06 '17 10:11 softvision-oana-arbuzov