Skip to content

Instantly share code, notes, and snippets.

View cnative100's full-sized avatar

Chris Newman cnative100

  • DirtyPixels
  • Earlysville, VA
View GitHub Profile
@SlicedSilver
SlicedSilver / Polymer Application Loading Screen.md
Last active February 21, 2017 02:04
Polymer Application Loading Screen

This is a simple snippet for adding a loading screen to a Polymer application. It is useful if your Polymer application is rather large and some users may be on a very slow internet connection.

The basic idea is that a very simple (and small) loading screen page will be loaded by the browser. When the browser has fully loaded and displayed the loading page then it will start loading all the files required for the Polymer application.

For a further speed improvement: the loading.css, and polymerAppLoader.js files can be placed inline with the index.html thus reducing the amount of files to be loaded from the server.

filestoload.html is a seperate file so that the usual grunt/gulp build functions can still be applied as before. Shouldn't require re-writting your build scripts.

Any improvements/comments are encouraged.