While working with webpack, vue few weeks ago, was thinking about predictive prefetch (preload), evade overfetch on low connections but did no knew analytics API could be used for predictive, this is awesome...
I'd really like to see fetching based on media queries. Right now to do a responsive layout you have to send CSS and JS for all types of devices in the initial response, or trigger fetches through JS event listeners and append the result to the HTML. It would be neat if you could specify individual JS and CSS files for different media queries, and the browser would fetch and apply them dynamically as needed, or do the necessary prefetching/preconnecting if the state is likely to change. For example you'd never see the desktop view on a phone, but you might see the mobile view on desktop if you snap the window to cover half of the screen, so on desktop you could prefetch the additional resources in the background.
This could be done effectively on CDN level if there was a widely adopted naming convention among developers to codesplitt HTML/CSS/JS resources for each xs sm md lg device types.
While working with webpack, vue few weeks ago, was thinking about predictive prefetch (preload), evade overfetch on low connections but did no knew analytics API could be used for predictive, this is awesome...
I'd really like to see fetching based on media queries. Right now to do a responsive layout you have to send CSS and JS for all types of devices in the initial response, or trigger fetches through JS event listeners and append the result to the HTML. It would be neat if you could specify individual JS and CSS files for different media queries, and the browser would fetch and apply them dynamically as needed, or do the necessary prefetching/preconnecting if the state is likely to change. For example you'd never see the desktop view on a phone, but you might see the mobile view on desktop if you snap the window to cover half of the screen, so on desktop you could prefetch the additional resources in the background.
This could be done effectively on CDN level if there was a widely adopted naming convention among developers to codesplitt HTML/CSS/JS resources for each xs sm md lg device types.
Super awesome! Can’t wait to try this
Amazing, thanks!
wahid zameer welldone boss in the google
Spectre 2.0 coming.