webcompat / web-bugs

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

mi.nba.com - mobile site not served to Firefox #667

Closed lmandel closed 9 years ago

lmandel commented 9 years ago

URL: http://mi.nba.com/ Browser / Version: Firefox Mobile 38.0 Operating System: Android Problem type: Looks like the website has a bug. Site owner: No

Steps to Reproduce 1) Navigate to: http://www.nba.com/

Expected Behavior: Site should redirect to mi.nba.com, which seems functional in Firefox. Actual Behavior: Desktop site is served.

karlcow commented 9 years ago

Thanks @lmandel for the report.

From Japan, it's a bit more complicated. When entering http://www.nba.com/ I'm being redirected to http://www.nba.co.jp/?gr=www which is a perfectly working responsive Web site.

There's a function to redirect me to the US site at the top.

function setEdition(){
  var selectedEdition = $('select#edition-select').val();
  set_HP_default(selectedEdition);
}

but each time I select it, it stays on the Japanese site.

selectedEdition is correctly initialized with us, but set_HP_default() doesn't work.

function set_HP_default(val){
  var expires = 1000 * 60 * 60 * 24 * 7; // set 7 days
  var today = new Date();
  today.setTime(today.getTime());
  expires = new Date(today.getTime() + (expires));
  $.cookie(navigationOptions.editionCookie, val, expires, "/")
  editionSetMessage();
  setTimeout('closeEdition()', 4000);
}

I finally manage to get to the US Web site.

The site at http://www.nba.com/ is not responsive and we are not redirected indeed to the mobile site.

The redirection is based on Android version number

Firefox Android UA is

Mozilla/5.0 (Android; Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

and doesn't trigger a redirect, while this non-existent UA triggers a redirect:

Mozilla/5.0 (Android 4.4.0; Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

This is happening server side.

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Host: www.nba.com
User-Agent: Mozilla/5.0 (Android 4.4.0; Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

HTTP/1.1 302 Moved Temporarily
Cache-Control: max-age=60
Connection: keep-alive
Content-Length: 153
Content-Type: text/html
Date: Mon, 02 Feb 2015 00:25:29 GMT
Expires: Mon, 02 Feb 2015 00:26:29 GMT
Location: http://mi.nba.com/
Server: nginx
Set-Cookie: CG=US:--:--; path=/
Vary: User-Agent
Vary: Accept-Encoding
X-UA-Device: mobile
X-UA-Profile: desktop

And

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Host: www.nba.com
User-Agent: Mozilla/5.0 (Android; Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

HTTP/1.1 302 Moved Temporarily
Cache-Control: max-age=59
Connection: keep-alive
Content-Length: 153
Content-Type: text/html
Date: Mon, 02 Feb 2015 00:25:53 GMT
Expires: Mon, 02 Feb 2015 00:26:52 GMT
Location: http://www.nba.co.jp/?gr=www
Server: nginx
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Set-Cookie: CG=US:--:--; path=/
Vary: User-Agent
Vary: Accept-Encoding
X-UA-Device: desktop
X-UA-Profile: desktop

To note that Firefox OS receives the mobile version. We need to find contacts. Mozilla has two bugs already for NBA.

@miketaylr had a contact at NBA: Jenn Schiffer @jennschiffer and the main person who handled the bug for Firefox OS was Nicholas Ortenzio @youbastard

I don't know if both are still working there and can help us again to reach the right persons.

jennschiffer commented 9 years ago

I don't work there anymore, but @youbastard does. I reached out to him over the weekend about it.

dysphasia commented 9 years ago

Passing this on to some internal groups at the NBA / Turner.

On Mon, Feb 2, 2015 at 10:39 AM, santa claus notifications@github.com wrote:

I don't work there anymore, but @youbastard https://github.com/youbastard does. I reached out to him over the weekend about it.

— Reply to this email directly or view it on GitHub https://github.com/webcompat/web-bugs/issues/667#issuecomment-72477724.

Nicholas Ortenzio nicholas.ortenzio@gmail.com

miketaylr commented 9 years ago

Thanks Nicholas!

karlcow commented 9 years ago

@lmandel is is fixed? (Still receiving the Japanese site from where I test).

lmandel commented 9 years ago

Yes! Firefox for Android is now redirected to the mobile site.