Skip to content

Added support for custom scopes (fully backwards compatible)

Latest
Compare
Choose a tag to compare
@TalAter TalAter released this 21 Dec 00:08
· 12 commits to master since this release

👍 This release is 100% backwards compatible

[Added] Allow defining a custom scope for UpUp

By passing a scope setting to either the addSettings() or start() functions, you can limit the scope for which UpUp will serve offline content.

For example the following code will only serve offline.html in response to requests within the blog subdirectory, even if the code is placed in the root directory.

UpUp.start({
  'content-url': '/blog/offline.html',
  'assets': ['/blog/img/logo.png', '/blog/css/style.css'],
  'scope': '/blog/'
});

❤️ Credits goes to @cspiker for developing, testing, and pull requesting this feature.

Minor changes:

For a full list of changes in this version see v1.0.0...v1.1.0