Releases: TalAter/UpUp
Added support for custom scopes (fully backwards compatible)
👍 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
Time for the v1.0.0 release (fully backwards compatible)
New in this version:
- Support for cache versions - https://github.com/TalAter/UpUp/blob/master/docs/README.md#cache-versions
- Uses event.request.mode to detect navigation events
- Removed (obsolete) serviceworker cache polyfill
- Fix passing settings to an active service worker
Plus much more behind the scenes: v0.3.0...v1.0.0
Pass requests untouched to server
Previous versions modified certain requests before passing them to the server. This change makes sure such requests pass untouched.
Thanks you @psykzz for the contribution!
Allow placing main script file in a separate directory (CDN support)
You can now load the main UpUp script (upup.min.js
) from a completely different directory, or even server, than where you keep the ServiceWorker file (upup.sw.min.js
).
This is a great way to load upup.min.js
from a CDN, and then only for users who use the Service Worker, load upup.sw.min.js
from your domain's root directory.
💡 upup.sw.min.js
must remain under the main domain (preferably at the root level), because that defines its scope. Read more here.
<script src="//cdnjs.cloudflare.com/ajax/libs/UpUp/0.2.0/upup.min.js"></script>
<script>
UpUp.start({
'content-url': 'offline.html',
'assets': ['/img/logo.png', '/css/style.css', 'headlines.json'],
'service-worker-url': '/upup.sw.min.js'
});
</script>
Contributed by: @mdibaiee
Minor tweaks. Bower support
v0.1.1 Bumped version to 0.1.1
First Public Release of UpUp
UpUp is now officially ready for use in the wild.
Getting started with UpUp is as easy as adding two javascript files to your site, upup.min.js & upup.sw.min.js, and defining the content you want your users to see when they are offline.
For example:
<script src="/upup.min.js"></script>
<script>
UpUp.start({
'content-url': 'offline.html',
'assets': ['/img/logo.png', '/css/style.css', 'headlines.json']
});
</script>