Edgio Devtools is a widget that helps developers understand how their site interacts with Edgio, including:
- Edge and browser caching
- The flow of responses from serverless to the edge and browser caches
It’s likely that Devtools was added to your app when you ran
edgio init. If that’s not the case, or your app predates Edgio v2.22.0, follow these steps to add the Devtools to your app:
In order to enable Edgio Devtools, first ensure that the
@edgio/prefetchpackages have been added to your project. To install them using NPM, run:
1npm i -D @edgio/devtools @edgio/prefetch
You may skip this step if you are using
1import installDevtools from '@edgio/devtools/install';23installDevtools();
Alternatively, you can add the following
scripttag to your app’s HTML:
1<script defer src="/__edgio__/devtools/install.js"></script>
Then, if you haven’t already, enable
@edgio/prefetchin your service worker. See Prefetching for more information on enabling
By default, Edgio Devtools is enabled when your app is served from
To customize when Edgio Devtools appear:
Using the Edgio Developer console, navigate to your environment and create an environment variable named
PREVIEW_EDGIO_DEVTOOLS_ENABLED. Set the value to
falseto explicitly enable or disable the Devtools on the given environment.
Point your browser to
/__edgio__/devtools/disableto explicitly enable or disable Edgio Devtools for your browsing session. This takes precedence over the environment config and the domain default.
If the Devtools were previously enabled and you disable them, you may want to remove the service worker to get rid of the Devtools-specific route handlers that were installed on-demand when enabling it. This can be done using the Application tab in Chrome Developer Tools.