isSlowConnection() — astro Function Reference
Architecture documentation for the isSlowConnection() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD fa17c239_9e46_24a4_170f_6c1482c21778["isSlowConnection()"] 315e53ea_6d34_137c_ce5c_8c89aca90db9["index.ts"] fa17c239_9e46_24a4_170f_6c1482c21778 -->|defined in| 315e53ea_6d34_137c_ce5c_8c89aca90db9 ea9541b4_bd9d_6d4f_5137_70ec3d7865b1["canPrefetchUrl()"] ea9541b4_bd9d_6d4f_5137_70ec3d7865b1 -->|calls| fa17c239_9e46_24a4_170f_6c1482c21778 70bfc884_b3b0_e84b_4b73_06d369aade2b["elMatchesStrategy()"] 70bfc884_b3b0_e84b_4b73_06d369aade2b -->|calls| fa17c239_9e46_24a4_170f_6c1482c21778 style fa17c239_9e46_24a4_170f_6c1482c21778 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/prefetch/index.ts lines 295–302
function isSlowConnection() {
if ('connection' in navigator) {
// Untyped Chrome-only feature: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection
const conn = navigator.connection as any;
return conn.saveData || /2g/.test(conn.effectiveType);
}
return false;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does isSlowConnection() do?
isSlowConnection() is a function in the astro codebase, defined in packages/astro/src/prefetch/index.ts.
Where is isSlowConnection() defined?
isSlowConnection() is defined in packages/astro/src/prefetch/index.ts at line 295.
What calls isSlowConnection()?
isSlowConnection() is called by 2 function(s): canPrefetchUrl, elMatchesStrategy.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free