Polymer/old-docs-site

API docs fail to display on first load

arthurevans opened this issue · 4 comments

For example, navigate to: https://3-0-staging-dot-polymer-project.appspot.com/3.0/docs/api/polymer-element

Page is blank on initial load, displays correctly on reload.

Hm, is this maybe a service worker or caching thing? I'm having trouble reproducing, either with my main Chrome profile, an incognito profile, or other browsers like Safari and Firefox.

I am seeing a bit of a delay while the page initializes on first navigation.

Couldn't repro either; suspect the previous SW is caching an old version of the API viewer element so it doesn't know how to handle the new format.

Ah, yeah, if a user gets a cached version of the iron-doc-viewer bundle, then it wouldn't have <iron-doc-module>, and the page would be blank.

Do we have a way of dealing with this in our service worker? If the user goes to any other page on the site, will the iron-doc-viewer bundle be updated? If that's the case, then only users that land on a specific 3.0 API docs as their first post-3.0 page view on the site will be affected.

We show the "Site updated, refresh to reload" toast, but you need to do a full page reload to get the new bundle. Clicking links on the same window will not trigger a full page reload.

Not really a way to "hotfix" since CEs are already defined, but maybe in the future we can just force the page to reload instead of just showing the toast.