You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the discussion in a previous bug (#50), and the public discussion around NavigationController as a prototype for a responsive images solution as well as CSP, I'm wondering what the stance is regarding the first page load.
Since the commonly used statistic for "empty cache users" is ~50% of users, I don't think that any non-cache related solution can be built to work only from the second load and up.
So, IMO, if we want to build NavigationController as a super-prolyfill building block (which would be awesome!), there should be a way to install the controller during the first page load, ideally before any resource needs to be fetched, to avoid blocking.
One way to enable this would be:
Inline the controller code into the HTML's top, before any other resources are mentioned, in the case that the controller is not already installed
Simplify the server side of step 1 by sending some sort of a "controller identifier" along with the request for the HTML, as an HTTP header. That would indicate the server if a controller is already installed, and if so which one. It'd also enable to "Vary" these responses in intermediate caches.
Flag the inline controller script so that the preloader will know the controller needs to be parsed and installed before the preloader starts issuing requests.
Install the controller on the first page load.
Does this sound reasonable?
The text was updated successfully, but these errors were encountered:
There is no plan for blocking first load in controllers. Doing so requires not only downloading the entire controller, but also any resources it requires (via loadScripts()) as well as running the entire upgrade dance (oninstall, onactivate, etc.) WHICH CAN FAIL while we have blocked loading of the document.
It's better to hide the doucment you want to control with CSS, use .replace() to get notification of successful install ASAP, and use navigator.controller.ready() to be informed of success/failure.
Lastly, you can't inline controller code. The inception problem bites hard, and NC is being designed to avoid it.
Following the discussion in a previous bug (#50), and the public discussion around NavigationController as a prototype for a responsive images solution as well as CSP, I'm wondering what the stance is regarding the first page load.
Since the commonly used statistic for "empty cache users" is ~50% of users, I don't think that any non-cache related solution can be built to work only from the second load and up.
So, IMO, if we want to build NavigationController as a super-prolyfill building block (which would be awesome!), there should be a way to install the controller during the first page load, ideally before any resource needs to be fetched, to avoid blocking.
One way to enable this would be:
Does this sound reasonable?
The text was updated successfully, but these errors were encountered: