Closed Bug 980572 Opened 6 years ago Closed 5 years ago

wsj.com returns desktop not mobile site to Firefox Android and Firefox OS

Categories

(Web Compatibility :: Mobile, defect)

ARM
Android
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dsun218, Assigned: karlcow)

References

()

Details

(Whiteboard: [country-us] [serversniff] [js] [webkitcss] [sitewait])

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140212131424

Steps to reproduce:

wsj.com returns desktop not mobile site to Fennec
Severity: normal → major
OS: Windows 7 → Android
Hardware: x86 → ARM
Severity: major → normal
Component: General → Mobile
Product: Firefox for Android → Tech Evangelism
Version: Firefox 27 → unspecified
Mobile Site: http://m.us.wsj.com/

In Chrome for Android, they are redirected.
Status: UNCONFIRMED → NEW
Ever confirmed: true
----

With Firefox Android (Mozilla/5.0 (Android; Mobile; rv:26.0) Gecko/26.0 Firefox/26.0)
or Firefox OS (Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0):

    GET / HTTP/1.1
    Host: wsj.com

    HTTP/1.1 301 Moved Permanently
    Cache-Control: max-age=2592000
    Content-Encoding: gzip
    Content-Length: 228
    Content-Type: text/html; charset=iso-8859-1
    Date: Sun, 09 Mar 2014 23:33:26 GMT
    Expires: Tue, 08 Apr 2014 23:33:26 GMT
    Location: http://online.wsj.com/
    Server: Apache
    Vary: Accept-Encoding

THEN

    GET / HTTP/1.1
    Host: online.wsj.com

    HTTP/1.1 301 Moved Permanently
    Cache-Control: max-age=2592000
    Content-Encoding: gzip
    Content-Length: 234
    Content-Type: text/html; charset=iso-8859-1
    Date: Sun, 09 Mar 2014 23:33:41 GMT
    Expires: Tue, 08 Apr 2014 23:33:41 GMT
    Location: http://online.wsj.com/home-page
    Server: Apache
    Vary: Accept-Encoding

THEN

    GET /home-page HTTP/1.1
    Host: online.wsj.com

    HTTP/1.1 301 Moved Permanently
    Cache-Control: no-cache, no-store, max-age=15
    Content-Encoding: gzip
    Content-Length: 251
    Content-Type: text/html; charset=iso-8859-1
    Date: Sun, 09 Mar 2014 23:33:52 GMT
    Expires: Sun, 09 Mar 2014 23:34:07 GMT
    Location: http://jp.wsj.com/home-page
    Server: Apache/2.2.15 (CentOS)
    Set-Cookie: djcs_route=6b43c897-30a1-4e5f-8b5e-283e9b08d2f7; domain=.wsj.com; path=/; Expires=Wed Mar 06 18:33:52 2024; max-age=315360000
    Set-Cookie: DJSESSION=continent%3das%7c%7czip%3d%7c%7ccountry%3djp%7c%7cregion%3d13%7c%7ccity%3dtokyo%7c%7clongitude%3d139.75%7c%7ctimezone%3dgmt%2b9%7c%7clatitude%3d35.69; path=/; domain=.wsj.com
    Set-Cookie: DJSESSION=continent%3das%7c%7czip%3d%7c%7ccountry%3djp%7c%7cregion%3d13%7c%7cORCS%3dasia%2cjp%7c%7ccity%3dtokyo%7c%7clongitude%3d139.75%7c%7ctimezone%3dgmt%2b9%7c%7clatitude%3d35.69; path=/; domain=.wsj.com
    Set-Cookie: DJCOOKIE=ORC%3dasia%2cjp; path=/; domain=.wsj.com; expires=Mon, 09-Mar-2015 23:33:52 GMT
    Set-Cookie: wsjregion=asia%2cjp; path=/; domain=.wsj.com
    Vary: Accept-Encoding

THEN

    GET /home-page HTTP/1.1
    Host: jp.wsj.com

    HTTP/1.1 200 OK
    Cache-Control: no-cache, no-store
    Cache-Control: max-age=15
    Content-Encoding: gzip
    Content-Length: 45179
    Content-Type: text/html; charset=UTF-8
    Date: Sun, 09 Mar 2014 23:34:05 GMT
    Expires: Sun, 09 Mar 2014 23:34:20 GMT
    FastDynaPage-ServerInfo: secj2kentwap09 - Sun 03/09/14 - 19:32:06 EDT
    P3P: CP=CAO DSP COR CURa ADMa DEVi TAIo PSAa PSDa IVDi CONi OTPi OUR OTRi BUS PHY ONL UNI PUR COM NAV INT DEM CNT STA OTC
    Server: Apache/2.2.15 (CentOS)
    Set-Cookie: djcs_route=a4d92b98-21f3-43d5-ae67-6e299255e412; domain=.wsj.com; path=/; Expires=Wed Mar 06 18:34:05 2024; max-age=315360000
    Set-Cookie: DJSESSION=continent%3das%7c%7czip%3d%7c%7ccountry%3djp%7c%7cregion%3d13%7c%7ccity%3dtokyo%7c%7clongitude%3d139.75%7c%7ctimezone%3dgmt%2b9%7c%7clatitude%3d35.69; path=/; domain=.wsj.com
    Set-Cookie: DJSESSION=continent%3das%7c%7czip%3d%7c%7ccountry%3djp%7c%7cregion%3d13%7c%7cORCS%3dasia%2cjp%7c%7ccity%3dtokyo%7c%7clongitude%3d139.75%7c%7ctimezone%3dgmt%2b9%7c%7clatitude%3d35.69; path=/; domain=.wsj.com
    Set-Cookie: DJCOOKIE=ORC%3dasia%2cjp; path=/; domain=.wsj.com; expires=Mon, 09-Mar-2015 23:34:05 GMT
    Set-Cookie: wsjregion=asia%2cjp; path=/; domain=.wsj.com
    Vary: Accept-Encoding

----

With iPhone/Safari (cutting the headers) "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; da-dk) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5"


    GET / HTTP/1.1
    Host: wsj.com

    HTTP/1.1 301 Moved Permanently
    Location: http://online.wsj.com/

THEN 

    GET / HTTP/1.1
    Host: online.wsj.com

    HTTP/1.1 301 Moved Permanently
    Location: http://online.wsj.com/home-page

THEN

    GET /home-page HTTP/1.1
    Host: online.wsj.com

    HTTP/1.1 302 Found
    Cache-Control: max-age=15
    Content-Encoding: gzip
    Content-Length: 253
    Content-Type: text/html; charset=iso-8859-1
    Date: Sun, 09 Mar 2014 23:37:45 GMT
    Expires: Sun, 09 Mar 2014 23:38:00 GMT
    Location: http://m.wsj.com/home-page?mg=reno64-wsj
    Server: Apache/2.2.15 (CentOS)
    Set-Cookie: djcs_route=df0fea9c-6a57-4df2-bb98-3473110b7143; domain=.wsj.com; path=/; Expires=Wed Mar 06 18:37:45 2024; max-age=315360000
    Vary: Accept-Encoding

THEN

    GET /home-page?mg=reno64-wsj HTTP/1.1
    Host: m.wsj.com

    HTTP/1.1 302 Moved Temporarily
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Connection: keep-alive
    Content-Length: 79
    Content-Type: text/plain
    Date: Sun, 09 Mar 2014 23:40:58 GMT
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Location: http://m.asia.wsj.com/home-page?mg=reno64-wsj
    Server: nginx/1.4.4
    X-Powered-By: Tesla

THEN

    GET /home-page?mg=reno64-wsj HTTP/1.1
    Host: m.asia.wsj.com

    HTTP/1.1 200 OK
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Connection: keep-alive
    Content-Encoding: gzip
    Content-Type: text/html; charset=UTF-8
    Date: Sun, 09 Mar 2014 23:42:12 GMT
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Server: nginx/1.4.4
    Set-Cookie: wsjregion=asia; Domain=.wsj.com; Path=/
    Transfer-Encoding: chunked
    X-Powered-By: Tesla

----

To Note: 

1. When requesting the mobile domain directly with Firefox OS and Firefox Android, the devices are being redirected to the desktop content. Example with (Mozilla/5.0 (Android; Mobile; rv:26.0) Gecko/26.0 Firefox/26.0)



    GET /home-page HTTP/1.1
    Host: m.asia.wsj.com

    HTTP/1.1 302 Moved Temporarily
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Connection: keep-alive
    Content-Length: 63
    Content-Type: text/plain
    Date: Sun, 09 Mar 2014 23:46:34 GMT
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Location: http://asia.wsj.com/home-page
    Server: nginx/1.4.4
    X-Powered-By: Tesla


2. They seem to have user agent specific code in JS. I haven't checked if it would make it difficult for Firefox Mobile devices.
   For example
   
       e.css({
        '-webkit-transform': 'translateY(-' + f + 'px) scaleY(1.5)'
    })

3. The CSS will create issues. Some examples (not all of them). Gradients, Flexbox, multicolumns.

    .module nav.sectional>ul {
        -webkit-column-count:2;
        -webkit-column-gap:1rem;
        padding:1.2rem .8rem;
    }


    .footplate.module .searchBar {
        background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f3ed),color-stop(.1,#ebe8de),to(#f5f2ec));
    }

    article.module>header .sourceStamp {
        font-size:1.1em;
        color:#6b6b6b;
        min-height:2.8rem;
        display:-webkit-box;
        -webkit-box-orient:vertical;
        -webkit-box-pack:center;
    }
Summary: wsj.com returns desktop not mobile site to Fennec → wsj.com returns desktop not mobile site to Firefox Android and Firefox OS
Whiteboard: [country-us] [serversniff] [js] [webkitcss] [contactready]
See Also: → 1001563
Note that the current mobile WSJ website is NOT suitable for Android tablets or iPads.  The layout works good only on smartphones.
(In reply to Matthew Zaleski from comment #3)
> Note that the current mobile WSJ website is NOT suitable for Android tablets
> or iPads.  The layout works good only on smartphones.

Understood, currently and the tests above are for:

* Firefox on Android Smartphones
  User-Agent: Mozilla/5.0 (Android; Mobile; rv:26.0) Gecko/26.0 Firefox/26.0
* Firefox OS (smartphone)
  User-Agent: Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0



In the future if you want need to take into account Tablets, it will be:

* Firefox on Android Tablet
  User-Agent: Mozilla/5.0 (Android; Tablet; rv:26.0) Gecko/26.0 Firefox/26.0
* Firefox OS (tablet)
  User-Agent: Mozilla/5.0 (Tablet; rv:26.0) Gecko/26.0 Firefox/26.0


Hope it helps.
Flags: needinfo?(bifur)
(In reply to Karl Dubost :karlcow from comment #4)
> 
> Hope it helps.

I have created a ticket with WSJ.com explaining the issue, including a link to this page and a copy of Karl's examples for distinguishing tablet from smartphones.
Flags: needinfo?(bifur)
Whiteboard: [country-us] [serversniff] [js] [webkitcss] [contactready] → [country-us] [serversniff] [js] [webkitcss] [sitewait]
Blocks: 1072117
This is not solved as of today.
We might need to find a direct contact at WSJ to understand the status of this bug.
From Japan, we are redirected to http://jp.wsj.com/

Searching for contacts
not updated since 2012. No good. https://twitter.com/midikris
Not working anymore at WSJ, but not such a long time ago https://twitter.com/okadots
Let's give it a try.

http://twitter.com/MozWebCompat/status/518968972096438274
Assignee: nobody → kdubost
Status: NEW → ASSIGNED
I'm the OP for this issue.  The problem _might_ be resolved.  I noticed a week or so ago that WSJ started applying a tablet CSS to articles from the WSJ Opinion RSS feed.  Today, I see that the new CSS has been applied to normal news items as well.  The new WSJ definitely is doing something different for Aurora on my Galaxy Note 3 compared to my Nexus 10.  Both seem to be mobile optimized but I'm no expert to know if they are following best practices for CSS and javascript.
Hi Matthew, 

cool to see you here.
Let me know if my comments help.


(In reply to Matthew Zaleski from comment #7)
> I'm the OP for this issue.  The problem _might_ be resolved. 

So just to summarize the issue. There is at least a server side detection of the User Agent. This can be tested for example by doing things like this on the command line. Here we are requesting the html page with different user agent and we check if the received content has been customized for mobile

# on Firefox Android AND Firefox OS, 
no viewport metatag is sent, we clearly receive a desktop version.

→ http --follow -b GET http://wsj.com/ 'User-Agent:Mozilla/5.0 (Android; Mobile; rv:30.0) Gecko/30.0 Firefox/30.0' | grep -i viewport
→ http --follow -b GET http://wsj.com/ 'User-Agent:Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0' | grep -i viewport

# On iPhone iOS 7
we receive the viewport, the content has been customized for Mobile.

→ http --follow -b GET http://wsj.com/ 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/6.0 Mobile/11A465 Safari/9537.53' | grep -i viewport
<meta name="viewport" content="width=device-width, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=160" />


Then I also tested by faking the UA of Chrome Mobile on Firefox Desktop. And the mobile content sent to Firefox in this case was tailored to Chrome to the point where it's not being displayed on Firefox. So There might be work to do after the server side UA detection.
Flags: needinfo?(bifur)
See Also: → 1091998
Just checked today this has not been solved yet.
I'm not sure Matthew is still available. 
We might need to find another contact.

There's another issue related to video: Bug 1091998 - wsj.com/video thinks that Firefox can't play HTML5 video on OS X
On Firefox Android and Firefox OS, I do not have any issues anymore.
It seems the site switched to a responsive Web site.

Thanks Matthew and WSJ Team.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(bifur)
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.