{"__browser":{"country":"US","device":"unknown_device","mobile":false,"name":"unknown browser","platform":"unknown_platform","version":"0"},"__constants":{},"__CPDATA":{"domain_iframe":"https://cdpn.io","environment":"production","host":"codepen.io","iframe_allow":"accelerometer *; ambient-light-sensor *; camera *; display-capture *; encrypted-media *; geolocation *; gyroscope *; microphone *; midi *; payment *; vr *; web-share *; serial *; xr-spatial-tracking *","iframe_sandbox":"allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups-to-escape-sandbox allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation"},"__graphql":{"data":{"data":{"sessionUser":{"id":"VoDkNZ","name":"Captain Anonymous","title":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","currentContext":{"id":"VoDkNZ","title":"Captain Anonymous","name":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","username":"anon","__typename":"User"},"currentTeamId":null,"username":"anon","admin":false,"anon":true,"pro":false,"verified":false,"featureFlags":[],"teams":[],"__typename":"User"}}},"url":"https://codepen.io/graphql","api":"cprails"},"__user":{"anon":true,"base_url":"/anon/","cohorts":[],"current_team_hashid":null,"current_team_id":0,"hashid":"VoDkNZ","id":1,"itemType":"user","name":"Captain Anonymous","paid":false,"tier":0,"username":"anon","created_at":null,"email_verified":null,"collections_count":0,"collections_private_count":0,"followers_count":0,"followings_count":0,"pens_count":0,"pens_private_count":0,"projects_count":0,"projects_private_count":0},"__firebase":{"config":{"apiKey":"AIzaSyBgLAe7N_MdFpuVofMkcQLGwwhUu5tuxls","authDomain":"codepen-store-production.firebaseapp.com","databaseURL":"https://codepen-store-production.firebaseio.com","disabled":false,"projectId":"codepen-store-production"},"token":"eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImNsYWltcyI6eyJvd25lcklkIjoiVm9Ea05aIiwiYWRtaW4iOmZhbHNlfSwiZXhwIjoxNzQyNTAyMjk0LCJpYXQiOjE3NDI0OTg2OTQsImlzcyI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInVpZCI6IlZvRGtOWiJ9.pkhfVwKwc7ZsjbUlX-z6alQ7gOn4mSU0xWJvndYP4nFrprYBtQtEGbl-GL9p86ciH-V5m0VRofeUTf0ZG4mkvlzCQrhe8YDPAXcMhIr_tVhsx57nHPmk4EcHFJILh4KgKrHCGhq1rXoTdY-ophG3KQkukLooFHBBsmCGeTq1jBoenHDRTgHhePz_lJ-t9VI5QRgVBBuvXVEv6cfEURfCJOcxaa8hErRxJk8JGNQBH8jV3_fSQoN0wlIXZFk0wPaZXGqLxMGTQDD-Uwk-72kTGUgspnOwgZcDqEWU4ELwuAFCJB-y3LenV8oW598DZT54nDe_gj4BI_zQP9b5W_ohEg"},"__pay_stripe_public_key":"pk_live_2GndomDfiklqpSNQn8FrGuwZSMIMzha7DkLJqlYe7IR0ihKAlKdiHg68JJc5eVPt68rzAjzAAVXcUwjySHRCsgjQQ00gtRBUFNH","__pay_braintree_env":"production","__item":"{\"id\":79760890,\"user_id\":357050,\"html\":\"<h1>Network information api results<\\/h1>\\n<p>This is an example page that displays the response received from the browser through the navigator.connection object.<\\/p>\\n<p>Due to <a href=\\\"https:\\/\\/wicg.github.io\\/netinfo\\/#privacy-considerations\\\">privacy considerations<\\/a>, the network information api isn't supported in Safari or Firefox.<\\/p> \\n<p>Chrome, Edge and Opera support: effective type, downlink and round trip time. All of which have maximum values to restrict fingerprinting, but still allow useful adaptations in periods of poor connection. <\\/p>\\n<p>Check <a href=\\\"https:\\/\\/caniuse.com\\/netinfo\\\">Network information API on caniuse<\\/a> for more details.<\\/p>\\n<button onclick=\\\"updateNetworkInfo()\\\">Get Network Info<\\/button>\\n<div id=\\\"info\\\">Click the button to get network details.<\\/div>\\n\\n\",\"css\":\"body { \\n font-family: 'Atkinson Hyperlegible', sans-serif; \\n padding: 20px; \\n margin: 3vh;\\n}\\n\\np {\\n max-width: 50ch;\\n margin-left: 1vh;\\n margin-right: 1vh;\\n}\\n\\n#info { \\n margin-top: 20px; \\n padding: 10px; \\n border: 1px solid #ccc; \\n max-width: 50ch;\\n}\",\"js\":\" function updateNetworkInfo() {\\n if ('connection' in navigator) {\\n const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;\\n \\n const info = `\\n <p><strong>Effective Type:<\\/strong> ${connection.effectiveType} (4g is max)<\\/p>\\n <p><strong>Downlink Speed:<\\/strong> ${connection.downlink} Mbps (10 is max)<\\/p>\\n <p><strong>RTT:<\\/strong> ${connection.rtt} ms (max 3000 ms, rounded to nearest 25s)<\\/p>\\n <p><strong>Save Data Mode:<\\/strong> ${connection.saveData ? 'Enabled' : 'Disabled'}<\\/p>\\n `;\\n \\n document.getElementById('info').innerHTML = info;\\n } else {\\n document.getElementById('info').innerText = 'Network Information API is not supported in this browser.';\\n }\\n }\\n \",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"none\",\"js_pre_processor\":\"none\",\"html_classes\":\"\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2025-02-25T13:08:49.332Z\",\"updated_at\":\"2025-02-27T09:18:33.722Z\",\"title\":\"Network information api example\",\"description\":\"\",\"slug_hash\":\"wBvzrgx\",\"head\":\"\",\"private\":false,\"slug_hash_private\":\"99191404c503b4f59348fea09a6ad3d9\",\"has_animation\":false,\"team_id\":0,\"css_prefix\":\"neither\",\"template\":false,\"parent_id\":0,\"comments_count\":0,\"custom_screenshot_filename\":null,\"loves_count\":0,\"pick\":false,\"popularity\":0,\"views_count\":0,\"pick_visible_at\":null,\"cpid\":\"01953d39-7034-7ec1-8b98-e1231fff9b52\",\"is_new_editor_pen\":false,\"access\":\"Public\",\"pen_hash\":null,\"hashid\":\"wBvzrgx\"}"}