Closed Bug 971235 Opened 8 years ago Closed 6 years ago

Pcmag.com serves mobile site to iPhone, Chrome, Opera. Desktop site to Firefox mobile,

Categories

(Web Compatibility :: Mobile, defect)

Other
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: adamopenweb, Unassigned, Mentored)

References

()

Details

(Whiteboard: [mobile-compat-form[clientsniff][contactready][lib-pressly])

Site: http://www.pcmag.com
Pcmag.com serves mobile site to iPhone, Chrome, Opera. Desktop site to Firefox mobile,

:: Steps To Reproduce

1. Open Firefox Android browser
2. Enter www.pcmag.com


:: Expected Result

Redirect to mobile site http://mobile.pcmag.com

:: Actual Result

Receive desktop site

:: Additional Information

Software Version: 30.0a1
Reporter's User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0
Can receive the mobile site when spoofing UA on Firefox for Android, but site does not function.
Whiteboard: [mobile-compat-form] → [mobile-compat-form][mentor=miketaylr]
Heh, going directly to the mobile.pcmag.com URL in Fx OS shows only an error message: "You've reached our mobile app but are not using a mobile browser!". This error even occurs in a desktop browser spoofing iPhone UA.

All this sniffing/device/feature detection is handled by the Pressly library:

  // Detect device
  Pressly.Device.detect();

  // Run device filters
  Pressly.Device.runFilters();

  if (Pressly.Device.isSupported() || forceRedirect) {
    var rootUrl = "www.pcmag.com";

    // Adjust the rootUrl if the rootUrl includes www but the location does not and no other subdomain is given
    if (rootUrl.indexOf("www.") === 0 && window.location.host.indexOf("www.") !== 0 && rootUrl.split('www.')[1] === window.location.host) {
      rootUrl = rootUrl.split("www.")[1];
    }

    var currentUrl = decodeURIComponent(spoofUrl || canonicalUrl() || (window.location.host + window.location.pathname));
    var path = window.location.href.split(rootUrl)[1];
    var atRoot = typeof path !== "undefined" && (path === "" || path === "/" || /\/index\./.test(path)) || onUserDefinedRoot();
    var sectionTitle = findSectionTitle();

    // Handle deep linked content or simply redirect to the Pressly application root
    if (atRoot) {
      // Goto the site directly
      window.location = redirectUrl;

We have another pressly bug here: 808572
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [mobile-compat-form][mentor=miketaylr] → [mobile-compat-form][mentor=hsteen][clientsniff][contactready][lib-pressly]
See Also: → 808572
Mentor: hsteen
Whiteboard: [mobile-compat-form][mentor=hsteen][clientsniff][contactready][lib-pressly] → [mobile-compat-form[clientsniff][contactready][lib-pressly]
See Also: → 1130125
Seems a lot better now, both Fx Android and Fx OS.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.