google / amp-pwa-demo Goto Github PK
View Code? Open in Web Editor NEWA simple, dependency-free blog that uses a Progressive Web App (PWA) to show Accellerated Mobile Pages (AMP).
License: Apache License 2.0
A simple, dependency-free blog that uses a Progressive Web App (PWA) to show Accellerated Mobile Pages (AMP).
License: Apache License 2.0
For example, clicking any of the article thumbnails in the “Related Articles” section will load the related article content without automatically scrolling back to the top of the page.
e.g. on GitHub pages, or Firebase
Currently we only start precaching on the second pageview, once the PWA is initialised and we can select <a>
tags with JavaScript.
If a user is still on the offline fallback page when reconnecting to the internet, we should load the actual page and automatically refresh.
To use as fallback when offline. Precaching the entire image would take up too much space. This might require a server-side solution (inlining data-uris for small images).
Currently, we assume that all pages except for a few exceptions are AMP and should be shown in the AMP shadow DOM. For other sites this might not be the case, and should be easily customisable.
Cmd+click on Mac opens pages in new tabs on the first load (before the service worker has been installed) but fails on subsequent page loads. This functionality should ideally be retained.
If you check out my branch https://github.com/cvializ/amp-pwa-demo/tree/click-bug and click on a link, you'll notice that the request to example.com does not occur after the user clicks a link. If you comment out e.preventDefault
in interceptLinkClick
, the analytics request does occur.
This bug was encountered while troubleshooting ampproject/amphtml#11540 where the reporter appears to have used this demo as a starting point.
This might require some additional work if we don't want the service worker to cache images, and if we want to dynamically size them based on the available space.
This is suggested by
https://developers.google.com/web/progressive-web-apps/checklist
Currently we use GCM, which has been deprecated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.