unisim.edu.sg sends desktop site to Firefox OS

RESOLVED WONTFIX

Status

P5
normal
RESOLVED WONTFIX
4 years ago
3 months ago

People

(Reporter: haseeb, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [country-sg] [clientsniff] [needscontact], URL)

Comment hidden (empty)

Comment 1

4 years ago
First the Web site redirects all clients to
http://www.unisim.edu.sg/Pages/UniSIM.aspx

On which there is a client side UA detection:

<script type="text/javascript">
var mobile = (/iphone|ipod|android|samsung|htc|windows phone|opera mini|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
if (mobile) {
  var isMobileTablet = (/mobile/i.test(navigator.userAgent.toLowerCase()));
  if (isMobileTablet) {
    var currentURL = window.location.href;
    if (document.referrer != '') {
      var urlReferrer = document.referrer;

      if (urlReferrer.indexOf("http://m.unisim.edu.sg") != -1) {}
    } else {
      document.location = "http://m.unisim.edu.sg/subpage.aspx?url=" + currentURL;
    }
  }
}</script>   

It would be better to do responsive design, but this script could be improved with:

var ua = navigator.userAgent.toLowerCase()
var mobile = (/mobi|android|samsung|htc|windows phone|blackberry|mini|windows\sce|palm/i.test(ua));
var tablet = (/ipad|tablet/i.test(ua));
if (mobile && !tablet) {
  document.location = "http://m.unisim.edu.sg/subpage.aspx?url=" + currentURL;
} else {
  var currentURL = window.location.href;
  if (document.referrer != '') {
    var urlReferrer = document.referrer;
    if (urlReferrer.indexOf("http://m.unisim.edu.sg") != -1) {}
  }
}

1. Some tablets do not have the mobile string, some tablets do have.
2. Matching on mobi will catch more mobile devices.


We need to find a contact.
Whiteboard: [country-sg] → [country-sg] [clientsniff] [needscontact]
Still an issue - seems to also use an old Brightcove script so Firefox OS gets a "update Flash player" message instead of a video on the front page.. :-/
Still an issue

Updated

2 years ago
Priority: -- → P5
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.