Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PWA guidance #31563

Merged
merged 4 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions aspnetcore/blazor/progressive-web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,49 @@ To obtain static assets, use **one** of the following approaches:
dotnet new blazorwasm -o MyBlazorPwa --pwa -f net5.0
```

:::moniker range=">= aspnetcore-8.0"

* Navigate to the ASP.NET Core GitHub repository at the following URL, which links to `main` branch reference source and assets. Select the release that you're working with from the **Switch branches or tags** dropdown list that applies to your app.

[Blazor WebAssembly project template `wwwroot` folder (dotnet/aspnetcore GitHub repository `main` branch)](https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/wwwroot)
[Blazor WebAssembly project template `wwwroot` folder (dotnet/aspnetcore GitHub repository `main` branch)](https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot)

[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]

From the source `wwwroot` folder either in the app that you created or from the reference assets in the `dotnet/aspnetcore` GitHub repository, copy the following files into the app's `wwwroot` folder:
From the source `wwwroot` folder either in the app that you created or from the reference assets in the `dotnet/aspnetcore` GitHub repository, copy the following files into the app's `wwwroot` folder:

* `icon-512.png`
* `manifest.json`
* `service-worker.js`
* `service-worker.published.js`
* `icon-192.png`
* `icon-512.png`
* `manifest.webmanifest`
* `service-worker.js`
* `service-worker.published.js`

In the app's `wwwroot/index.html` file:

* Add `<link>` elements for the manifest and app icon:

```html
<link href="manifest.webmanifest" rel="manifest" />
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
<link rel="apple-touch-icon" sizes="192x192" href="icon-192.png" />
```

:::moniker-end

:::moniker range="< aspnetcore-8.0"

* Navigate to the ASP.NET Core GitHub repository at the following URL, which links to the `release/7.0` branch reference source and assets. If you're using a version of ASP.NET Core later than 7.0, change the document version selector to see the updated guidance for this section. Select the release that you're working with from the **Switch branches or tags** dropdown list that applies to your app.

[Blazor WebAssembly project template `wwwroot` folder (dotnet/aspnetcore GitHub repository `release/7.0` branch)](https://github.com/dotnet/aspnetcore/tree/release/7.0/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/wwwroot)

[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]

From the source `wwwroot` folder either in the app that you created or from the reference assets in the `dotnet/aspnetcore` GitHub repository, copy the following files into the app's `wwwroot` folder:

* `favicon.png`
* `icon-512.png`
* `manifest.json`
* `service-worker.js`
* `service-worker.published.js`

In the app's `wwwroot/index.html` file:

Expand All @@ -112,6 +143,8 @@ In the app's `wwwroot/index.html` file:
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
```

:::moniker-end

* Add the following `<script>` tag inside the closing `</body>` tag immediately after the `blazor.webassembly.js` script tag:

```html
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/security/webassembly/graph-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1033,5 +1033,5 @@ The examples in this article pertain to using the Graph SDK or a named `HttpClie
* [Overview of Microsoft Graph permissions](/graph/permissions-overview)
* [Microsoft Graph permissions reference](/graph/permissions-reference)
* [Enhance security with the principle of least privilege](/azure/active-directory/develop/secure-least-privileged-access)
* [Microsoft Security Best Practices: Securing privileged access](/security/compass/overview)
* [Microsoft Security Best Practices: Securing privileged access](/security/privileged-access-workstations/overview)
* [Azure privilege escalation articles on the Internet (Google search result)](https://www.google.com/search?q=%22Azure+Privilege+Escalation%22)
Loading