[flutter_tools] cache-bust in service worker (#56786)

This commit is contained in:
Jonah Williams
2020-05-16 14:57:04 -07:00
committed by GitHub
parent e7b6b52102
commit 631087d83b
7 changed files with 264 additions and 11 deletions

View File

@@ -2,12 +2,25 @@
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<html lang="en">
<html>
<head>
<meta charset="UTF-8">
<title>web_integration</title>
<script defer src="main.dart.js" type="application/javascript"></script>
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<title>Web Test</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>

View File

@@ -0,0 +1,12 @@
{
"name": "web_integration_test",
"short_name": "web_integration_test",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": []
}