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 docs for getting token for origin trial #2885

Merged
merged 23 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 22 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
2 changes: 2 additions & 0 deletions microsoft-edge/devtools-guide-chromium/whats-new/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ ms.date: 08/18/2023

[!INCLUDE [Microsoft Edge team note for top of What's New](includes/edge-whats-new-note.md)]

What's New articles correspond to historical releases of Microsoft Edge, and are not updated over time. References to "new features" and "experiments" might become outdated as new versions of Microsoft Edge are released.

<!-- maintenance notes:
* add the new page to toc.yml
* move eleventh oldest link into whats-new-archive.md
Expand Down
95 changes: 9 additions & 86 deletions microsoft-edge/origin-trials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,99 +5,22 @@ author: MSEdgeTeam
ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.date: 02/02/2023
ms.date: 10/25/2023
---
# Use Origin Trials in Microsoft Edge

You can use Origin Trials to try out experimental APIs on your own live site for a limited period of time. When using Origin Trials, users of Microsoft Edge that visit your site might run code that uses experimental APIs.

You can use Origin Trials to try out experimental APIs on live sites for a limited period of time. When using Origin Trials, users of Microsoft Edge that visit your site may run code that uses experimental APIs. To access the experimental APIs on each user machine, you don't need to go to `edge://flags` and turn on feature flags.
To support the experimental APIs, users don't need to go to `edge://flags` on their own device to access the experimental APIs that your site uses. Instead, you register the origin that you want to use the experimental feature on (for example, `https://www.contoso.com:443`), and you'll then be sent a token that you add to the code of your website.

Instead, you register the origin (for example, `https://www.contoso.com:443`) that you want to use the experimental feature on and you'll be issued a token that you add to the code of your website.
To see a list of the available origin trials and register your origin to give them a try, see [Microsoft Edge Origin Trials](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/). To assess the suitability of using the experimental APIs on your website, check the minimum version requirements for Microsoft Edge, and the trial end date.

To see a list of the available origin trials and register your origin to give them a try, see the [Microsoft Edge Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials/). You can also provide feedback to browser engineers and the web standards community about the design of the API, your use cases, or your experience using the APIs.
You can also provide feedback to browser engineers and the web standards community about the design of the API, your use cases, or your experience using the APIs.

For more information, see the **Getting Started** and **Developer Guidelines** sections in [Microsoft Edge Origin Trials](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/).

<!-- ====================================================================== -->
## Get started using Origin Trials

For more information about the experimental APIs available in Microsoft Edge, see [Microsoft Edge Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials). Be sure to review the minimum version requirements for Microsoft Edge, and the trial end date, to assess the suitability of using the experimental APIs on your website.

> [!NOTE]
> An experiment may end earlier than planned if any of the following situations occur:
> * A major security incident.
> * If sufficient feedback is collected that indicates a major redesign is needed to meet the needs of web developers.
> In either case, a notification email is sent to all developers currently enrolled in the experiment.

### Register for a trial of an experimental API

To register for a trial of an experimental API:

1. Go to [Microsoft Edge Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials).

1. Click the **Register** button on any of the available experiments.

1. Sign in to the Developer Console using your GitHub username and password.

1. Click **Authorize MicrosoftEdge**.

1. Complete the form.

> [!NOTE]
> To enroll a single or all subdomains, choose set the `Do you need to match all subdomains for the provided origin?` setting to `Yes`. For example, `https://dev.contoso.com` is a single domain, and `https://*.contoso.com` uses a wildcard to represent all subdomains.

> [!IMPORTANT]
> The following origin formats aren't allowed.
> * Specifying a subfolder on the origin. For example, `https://contoso.com/path/subfolder`
>
> * Using an origin with query string parameters. For example, `https://contoso.com/path/feature?query_parameter=12345`

1. Click **ACCEPT and REGISTER**.

### Apply your token

A token is instantly generated and displayed on the [Microsoft Edge Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials). To begin using the trial on your website, use either of the following methods to apply the token to your page:

* Add the `origin-trial` attribute value and your token to the `meta` tag on every page that uses the experimental API.

```html
<meta http-equiv="origin-trial" content="replace-with-your-token">
```

* Add `Origin-Trial` to the HTTP response header of your server.

```json
Origin-Trial: replace-with-your-token
```

> [!NOTE]
> Your token is valid for 6 weeks. Before your trial ends, reminder emails are sent to you that ask for your feedback and ask you to consider renewing your trial before your token expires.

### Opt out of an experiment

To opt out of an experiment, use one of the following methods to remove your token.

* Remove the `meta` tag from every page that used the experimental API.

```html
<meta http-equiv="origin-trial" content="your-token">
```

* Remove `Origin-Trial` from the HTTP response header of your server.

```json
Origin-Trial: your-token
```

### Detect experimental features and provide a fallback

When using experimental APIs, ensure you provide a working experience to all visitors of your website. Visitors may use browsers that don't support the experimental APIs that you added to your code. Additionally, if your token expires before you renew it, the experimental API is no longer available, which may result in errors.

To avoid this situation, make sure you detect features available in your browser. For more information, see [Implementing feature detection](https://developer.mozilla.org/docs/learn/tools_and_testing/cross_browser_testing/feature_detection).

### Roadmap for Allowed Origins

The Microsoft Edge Origin Trials portal today only supports SSL Enabled Origins, which means that websites must have HTTPS properly implemented to register for an experiment. In the future, the following secure origins are planned:

* Register `http://localhost` as the origin for your experiments. To use `http://localhost` today, go to `edge://flags` and set the experiment to **Enabled**.
<!-- ====================================================================== -->
## See also

* Use extensions with `extensions://` prefixed origins to enroll in experiments.
* [Experimental features and origin trials](../progressive-web-apps-chromium/how-to/origin-trials.md) in the Progressive Web Apps (PWA) docs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ ms.date: 09/15/2022
---
# Handle links to your Progressive Web Apps

Native applications on many operating systems can handle links. Native applications can request to be launched, instead of the web browser, when associated URLs are activated, to create a more engaging experience for these applications.
Native apps on many operating systems can handle links. When associated URLs are activated, native apps can request to be launched instead of the web browser, to create a more engaging experience for these apps.

Progressive Web Apps (PWAs) can also handle links in a similar way.

<!--
link handling vs. url handling:
Although the present filename is handle-urls.md, this file was repurposed to cover link handling rather than URL handlers.
The PWA URL handlers feature was removed from Chromium.
See also [PWAs as URL Handlers](https://web.dev/pwa-url-handler/).
-->


<!-- ====================================================================== -->
## Automatic link handling
Expand Down Expand Up @@ -49,4 +56,4 @@ Once the feature can be used in Microsoft Edge, we will document it here. In the
<!-- ====================================================================== -->
## See also

* [PWAs as URL Handlers](https://web.dev/pwa-url-handler/).
* [PWAs as URL Handlers](https://web.dev/pwa-url-handler/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,39 @@ ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.technology: pwa
ms.date: 11/25/2022
ms.date: 10/20/2023
---
# Experimental features and origin trials

Some of the PWA features in Microsoft Edge are still experimental. Experimental features can be used in two ways:
Some of the PWA features in Microsoft Edge are still experimental. Experimental features can be used in either of two ways:

* By enabling the corresponding flag in Microsoft Edge.
* By enrolling your site in an origin trial to test features in production with your users.
* By enabling the corresponding flag in Microsoft Edge.
* By enrolling your site in an origin trial to test features in production with your users.


<!-- ====================================================================== -->
## Toggle experimental features

To turn experimental features on or off:

1. Open Microsoft Edge.
1. Go to `edge://flags`.
1. Navigate to the relevant experiment.
1. Select the dropdown menu next to the experiment description and select **Enabled** to turn on the feature or **Disabled** to turn it off.
1. Open Microsoft Edge.
1. Go to `edge://flags`.
1. Navigate to the relevant experiment.
1. In the dropdown menu next to the experiment description, select **Enabled** to turn on the feature, or **Disabled** to turn it off:

![Select Enabled to turn on an experiment](./origin-trials-images/turn-on-experimental-flag.png)
![Select Enabled to turn on an experiment](./origin-trials-images/turn-on-experimental-flag.png)


<!-- ====================================================================== -->
## Enroll your site in an origin trial

Microsoft Edge sometimes uses origin trials to test features for specific domains or websites. You may want to use an origin trial for your website to apply a specific feature. If you're a website owner, you can enroll in an origin trial. An origin trial provides features to a percentage of Microsoft Edge users who visit your website.

For more information about Origin Trials, see [Microsoft Edge Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials).
For more information, see [Microsoft Edge Origin Trials](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/).


<!-- ====================================================================== -->
## See also

* [Use Origin Trials in Microsoft Edge](../../origin-trials/index.md)
* [What's New in Progressive Web Apps](../whats-new/pwa.md)
25 changes: 18 additions & 7 deletions microsoft-edge/progressive-web-apps-chromium/whats-new/pwa.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ author: MSEdgeTeam
ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.date: 02/23/2022
ms.date: 10/24/2023
---
# What's New in Progressive Web Apps

This page lists the updates to Progressive Web Apps (PWAs) and Web Apps from the Microsoft Edge Web Apps team. To try new features, read these announcements. To stay up to date with the latest and greatest features, download the [Microsoft Edge preview channels](https://www.microsoft.com/edge/download/insider) (Beta, Dev, and Canary).

Sections of this document correspond to historical releases of Microsoft Edge, and are not updated over time. For example, references below to "new features" or "origin trials" might become outdated as new versions of Microsoft Edge are released.


<!-- ====================================================================== -->
## What's New in Microsoft Edge 114
Expand Down Expand Up @@ -252,18 +254,20 @@ Learn more in [Publish a Progressive Web App to the Microsoft Store](../how-to/m

To have more control over the title bar area that's currently displayed in standalone display mode, you may want to experiment with Window Controls Overlay. Window Controls Overlay (WCO) is a set of features that work together to provide just the essential controls needed for the app window. This layout frees up more space for the web content layer. WCO is available for installed desktop PWAs.

Learn more about experimenting with Window Controls Overlay at [Experimental features in Progressive Web Apps (PWAs)](../how-to/window-controls-overlay.md).
Learn more about experimenting with Window Controls Overlay at [Display content in the title bar](../how-to/window-controls-overlay.md).

Register your origin for the **Web App Window Controls Overlay** trial at our [Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials/web-app-window-controls-overlay/registration/).
_2023 update: This feature is no longer in [Origin Trial](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/) and is available to all users, so the following no longer applies:_ Register your origin for the **Web App Window Controls Overlay** trial at our [Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials/web-app-window-controls-overlay/registration/).


#### URL Handlers origin trial

Developers can now use the experimental feature Web App URL Handlers in origin trial. This feature allows the registration of an installed PWA to open links from other apps that refer to its scope.

Learn more about experimenting with URL handlers at [Experimental features in Progressive Web Apps (PWAs)](../how-to/handle-urls.md).
_2023 update: This feature is no longer in [Origin Trial](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/) and has been removed, so the following no longer applies, and the PWA URL Handlers feature was removed from the Chromium browser engine:_ Register your domain for the **Web App URL Handlers** trial at our [Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials/web-app-url-handlers/registration/).

Register your domain for the **Web App URL Handlers** trial at our [Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials/web-app-url-handlers/registration/).
See also:
* [Handle links to your Progressive Web Apps](../how-to/handle-urls.md)
* [PWAs as URL Handlers](https://web.dev/pwa-url-handler/)


#### Support for the Share API on macOS
Expand All @@ -281,9 +285,9 @@ Microsoft Edge version 92 became the stable channel of Microsoft Edge on July 22

#### Protocol handlers origin trial

You can now register your PWA to handle specific protocols with the host operating system. The Windows trial for protocol handlers is now available. You can register your origin for the **Web App Protocol Handler** trial at the [origin trial signup page](https://developer.microsoft.com/microsoft-edge/origin-trials/web-app-protocol-handler-registration/registration).
You can now register your PWA to handle specific protocols with the host operating system. Learn more about using protocol handlers with your PWA at [Handle protocols in Progressive Web Apps](../how-to/handle-protocols.md).

Learn more about using protocol handlers with your PWA at [Experimental features in Progressive Web Apps (PWAs)](../how-to/handle-protocols.md).
_2023 update: This feature is no longer in [Origin Trial](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/) and is available to all users, so the following no longer applies:_ The Windows trial for protocol handlers is now available. You can register your origin for the **Web App Protocol Handler** trial at the [origin trial signup page](https://developer.microsoft.com/microsoft-edge/origin-trials/web-app-protocol-handler-registration/registration).


#### Streamlined App Info menu
Expand Down Expand Up @@ -323,3 +327,10 @@ This feature is being rolled out gradually to all users. In the meantime, if yo
Installed sites and PWAs that were running before an unexpected shutdown will now restore (that is, they will be restarted) when the system recovers.

An unexpected shutdown can occur due to process failure, system restart, or power outage. Before this change, installed sites and PWAs had indeterminate behavior upon system restore.


<!-- ====================================================================== -->
## See also

* [Experimental features and origin trials](../how-to/origin-trials.md)
* [Use Origin Trials in Microsoft Edge](../../origin-trials/index.md)
3 changes: 2 additions & 1 deletion microsoft-edge/test-and-automation/test-and-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ See [DevTools Protocol](devtools-protocol.md).

You can use Origin Trials to try out experimental APIs on live sites for a limited period of time. When using Origin Trials, users of Microsoft Edge that visit your site may run code that uses experimental APIs. To access the experimental APIs on each user machine, you don't need to go to `edge://flags` and turn on feature flags.

To see a list of the available origin trials and register your origin to give them a try, see the [Microsft Edge Origin Trials Developer Console](https://developer.microsoft.com/microsoft-edge/origin-trials/). You can also provide feedback to browser engineers and the web standards community about the design of the API, your use cases, or your experience using the APIs.
To see a list of the available origin trials and register your origin to give them a try, see [Microsoft Edge Origin Trials](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/). You can also provide feedback to browser engineers and the web standards community about the design of the API, your use cases, or your experience using the APIs.


<!-- ====================================================================== -->
## Playwright
Expand Down
Loading