diff --git a/src/routes/dashboard/device.tsx b/src/routes/dashboard/device.tsx index 8e4f4a1..187a358 100644 --- a/src/routes/dashboard/device.tsx +++ b/src/routes/dashboard/device.tsx @@ -4,34 +4,46 @@ import { ErrorPlaceholder } from "../../components/ErrorPlaceholder/ErrorPlaceho import { useEffect } from "react"; const Device = () => { - useEffect(() => { - const request = new XMLHttpRequest(); - request.onreadystatechange = function () { - if (request.readyState === XMLHttpRequest.DONE) { - // - // The following headers may often be similar - // to those of the original page request... - // - console.info(request.getAllResponseHeaders()); - } - }; - - // - // Re-request the same page (document.location) - // We hope to get the same or similar response headers to those which - // came with the current page, but we have no guarantee. - // Since we are only after the headers, a HEAD request may be sufficient. - // - request.open("HEAD", document.location, true); - request.send(null); - }, []); - return ( ( )}> - couc +

Platform : {navigator.platform}

+

+

Downlink : {(navigator as any).connection.downlink}

+ + The downlink attribute represents the effective bandwidth estimate in + megabits per second, rounded to nearest multiple of 25 kilobits per + second, and is based on recently observed application layer throughput + across recently active connections, excluding connections made to + private address space [RFC1918]. In absence of recent bandwidth + measurement data, the attribute value is determined by the properties of + the underlying connection technology. MDN + +

+

EffectiveType : {(navigator as any).connection.effectiveType}

+ + The effectiveType attribute, when getting, returns the effective + connection type that is determined using a combination of recently + observed rtt and downlink values. + +

+ +

Rtt : {(navigator as any).connection.rtt}

+ + The rtt attribute represents the effective round-trip time estimate in + milliseconds, rounded to nearest multiple of 25 milliseconds, and is + based on recently observed application-layer RTT measurements across + recently active connections, excluding connections made to private + address space [RFC1918]. In absence of recent RTT measurement data, the + attribute value is determined by the properties of the underlying + connection technology. + +

+ +

SaveData : {(navigator as any).connection.saveData.toString()}

+
); };