navigator.deviceMemory return different value for different pages
Reported by
leehom...@gmail.com,
May 18 2018
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Steps to reproduce the problem: 1. open different pages 2. typed navigator.deviceMemory What is the expected behavior? return the size of memory What went wrong? different value return, sometime is 'undefined' , sometime is '8' Did this work before? N/A Does this work in other browsers? No when i typed 'navigator.deviceMemory' it returned 'undefined' ,however , i try it several time,it returned '8' sometime. Chrome version: 66.0.3359.139 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version:
,
May 21 2018
leehom913@ Thanks for the issue. Tested this issue on Windows 10, 7, Mac OS 10.13.3 on the reported version 66.0.3359.139 and the latest Canary 68.0.3436.0 and unable to reproduce the issue. On entering 'navigator.deviceMemory' in console, it is returning 8 in all the pages. Attached is the screen cast for reference. Request you to update chrome to the latest Stable, retry the issue on a new chrome profile without any flags,extensions and update the thread with the observations. thanks,,''
,
May 22 2018
the page which navigator.deviceMemory undefined is http://www.droidsec.cn/drozer%E6%A8%A1%E5%9D%97%E7%9A%84%E7%BC%96%E5%86%99%E5%8F%8A%E6%A8%A1%E5%9D%97%E5%8A%A8%E6%80%81%E5%8A%A0%E8%BD%BD%E9%97%AE%E9%A2%98%E7%A0%94%E7%A9%B6/
,
May 22 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 22 2018
sorry, please download it
,
May 24 2018
leehom913@ Thanks for the update Able to reproduce the issue on Windows 10, Mac OS 10.13.3 and Ubuntu 14.04 on the latest Canary 68.0.3439.0 and Stable 66.0.3359.181 as per comment #3. In the latest Chrome builds, On navigating to the link given in comment #3, entering 'navigator.deviceMemory' in console, it is returning undefined. On any other webpage, navigator.deviceMemory is returning 8 . In M-60 builds, entering navigator.deviceMemory on any page is returning undefined. Attached is the screen shot for reference. This is a Non-Regression issue as this behavior is observed from M60 Chrome builds. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
May 29 2018
This does not seem like a DOM bug. fmeawad@, history shows you touching this a little at least, any idea where to send this bug?
,
May 29 2018
Thank you for reporting the issue. This is is WAI, navigator.deviceMemory only works in secure pages. The page in the example that is returning undefined is an http page (unsecure page). If you consult sections 3 and 4 of the spec: https://w3c.github.io/device-memory/#sec-device-memory-js-api you will find that in the definition it mentions that it is only available for secure context, and in the consideration section it mentions that it will only be available in https pages.
,
May 30 2018
Thank you very much for your answer~ |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by krajshree@chromium.org
, May 20 2018