Use this page to test and see it working.
Open your browser's console and check the cached content, and the network requests as you test the features.
You can use push notifications
ONLINE
Turn on and off your wi-fi
01
Load image
This example will successfuly load an image from cache.
This image loads dynamically and will be cached only after the first time it loaded successfuly.
Loading JSON data from an address.
You could load a REST API for example.
This information will be stored in an IndexedDB structure.
It uses a "online-first" strategy, so, it will always look first for it online(using the network).
Redirecting pages under a given directory.
Run the test more times to see random pages being redirected.
These pages will be cached only after the first time they got loaded.
After that, you can get offline and seen each one of them working from cache, too.
Also, the redirected page is receiving a variable with the information.
We are embeding content here, so you can try and load external libraries, audio, video, etc.
Also, we are using external data from github to show the stars button and the shields on top of this page.
➤ Run test
09
Media
You can load and use media like audio or video.
Be careful, though, avoid adding large files to your user's storage.
➤ Run test
10
Trigger Message
You can test the push notification.
It will ask Google's GCM server to push a notification. As soon as the notification arrives, it simply shows you a default message.
This will only work online, of course.