Closed Bug 878647 Opened 12 years ago Closed 11 years ago

sat.gob.mx doesn't recognize B2G UA as mobile

Categories

(Web Compatibility :: Site Reports, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: lmandel, Unassigned)

References

()

Details

(Whiteboard: [uaoverride] [country-mx] [clientsniff] [contactready] [bugday-20150624] )

sat.gob.mx serves a desktop site to B2G. Bug 823364 added an UA override for this domain. The override should be removed once the domain serves mobile content to B2G. This bug tracks the evangelism for the site to recognize the B2G UA and the removal of the override at that time.
Blocks: sat.gob.mx
Whiteboard: [uaoverride]
Another site acting strangely. We can't rely on the HEAD at all. See https://gist.github.com/karlcow/6003361 And for Firefox OS UA string, HEAD and GET are different but in a different manner than the example in gist. > → http GET http://sat.gob.mx/ User-Agent:'Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0' > > HTTP/1.1 200 OK > Accept-Ranges: bytes > Content-Encoding: gzip > Content-Length: 635 > Content-Type: text/html > Date: Mon, 15 Jul 2013 21:23:46 GMT > ETag: "0d97389a816cd1:0" > Last-Modified: Mon, 09 Apr 2012 23:28:58 GMT > Server: Microsoft-IIS/7.0 > Vary: Accept-Encoding > X-Powered-By: ASP.NET > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="content-type" content="text/html;charset=UTF-8"/> > <title>Servicio de Administraci&oacute;n Tributaria</title> > <script type="text/javascript"> > function Dmovil() { > var agent = navigator.userAgent.toLowerCase(); > var iphone = (agent.indexOf('iphone')!=-1); > var ipod = (agent.indexOf('ipod')!=-1); > var android = (agent.indexOf('android')!=-1); > var avantgo = (agent.indexOf('avantgo')!=-1); > var blackberry = (agent.indexOf('blackberry')!=-1); > var kindle = (agent.indexOf('kindle')!=-1); > var lge = (agent.indexOf('lge')!=-1); > var maemo = (agent.indexOf('maemo')!=-1); > var operamini = (agent.indexOf('opera mini')!=-1); > var operamobi = (agent.indexOf('opera mobi')!=-1); > var palmos = (agent.indexOf('palm os')!=-1); > if ((iphone)||(ipod)||(android)||(avantgo)||(blackberry)||(kindle)||(lge)||(maemo)||(operamini)||(operamobi)||(palmos)) > { > > return true; > } > else { return false; } > } > > var paginam="http://www.sat.gob.mx/sitio_internet/default2.htm" > var completa="http://www.sat.gob.mx/sitio_internet/home.asp" > > if (Dmovil()) { > location.href=paginam > } > else > { > location.href=completa > } > </script> > </head> > <body> > > </body> > </html> In this JavaScript, there's no mobile string so Firefox OS is redirected to the desktop Site.
Whiteboard: [uaoverride] → [uaoverride] [country-mx]
So if they want to filter on Mobile, but not tablet. > >var ua = "mobile" > >ua.indexOf('mobile')!=-1 > true > >ua.indexOf('tablet')==-1 > true > >ua.indexOf('tablet')==-1 && ua.indexOf('mobile')!=-1 > true > >var ua = "mobile tablet" > >ua.indexOf('tablet')==-1 && ua.indexOf('mobile')!=-1 > false So they need to add this line: > var mobile = (agent.indexOf('mobile')!=-1 && agent.indexOf('tablet')==-1 ); and > if ((iphone)||(ipod)||(android)||(avantgo)||(blackberry)||(kindle)||(lge)||(maemo)||(operamini)||(operamobi)||(palmos)||(mobile)) It is still not clean, and future fail for any new string scheme that would appear but that would do the job in the meantime.
Whiteboard: [uaoverride] [country-mx] → [uaoverride] [country-mx] [clientsniff]
Whiteboard: [uaoverride] [country-mx] [clientsniff] → [uaoverride] [country-mx] [clientsniff] [contactready]
No response on Twitter? The website is difficult to find a contact.
Flags: needinfo?(kdubost)
Adam, The @satmx twitter account seems to never interact with people. So it was a real shot in the dark. Not working. To access their service we have to call them and have a tax account for resident. > Servicio de Administración Tributaria, Av. Hidalgo 77, col. Guerrero, c.p. 06300, México, D.F.-Atención telefónica 01 800 46 36 728. Desde Estados Unidos y Canadá: 1 877 44 88 728 I guess alex is the best person to contact them at this point.
Flags: needinfo?(kdubost) → needinfo?(alex_mayorga)
Is this bug still valid? Can't find any mobile browser that actually gets a mobile site from sat.gob.mx now.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Confirmed. I can remove it from UA override.
Blocks: 948642
Guess I won't be paying taxes from a Flame anytime soon...
Status: RESOLVED → VERIFIED
Flags: needinfo?(alex_mayorga)
Whiteboard: [uaoverride] [country-mx] [clientsniff] [contactready] → [uaoverride] [country-mx] [clientsniff] [contactready] [bugday-20150624]
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.