old-docs-site icon indicating copy to clipboard operation
old-docs-site copied to clipboard

API docs fail to display on first load

Open arthurevans opened this issue 7 years ago • 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.

arthurevans avatar May 01 '18 17:05 arthurevans

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.

rictic avatar May 02 '18 01:05 rictic

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.

keanulee avatar May 02 '18 18:05 keanulee

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.

rictic avatar May 02 '18 21:05 rictic

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.

keanulee avatar May 02 '18 22:05 keanulee