Search…
Custom
Basic Edgemesh installation instructions applicable to most sites and platforms.
This section describes installing Edgemesh manually. Edgemesh can be installed on any website using this method as long as the Prerequisites are met.

Create a file at the root of your web server called sw.js. It should be accessible from https://yoursite.com/sw.js. Add the following line:
sw.js
importScripts('https://static.edgeme.sh/edgemesh-sw.js')

Add the following line as early as possible to the <head> tag of your index.html:
index.html
<script
async
type="application/javascript"
data-cfasync="false"
src="https://static.edgeme.sh/client.js">
</script>
You can pass any of the Client Config options to the Edgemesh class constructor:
index.html
<script type="application/javascript">
EDGEMESH = {
swUrl: '/my-sw.js',
scope: '/assets'
}
</script>
<script
async
type="application/javascript"
data-cfasync="false"
src="https://static.edgeme.sh/client.js">
</script>
That's it! If there is an installation issue it will be printed in your browsers javascript console. A common one is forgetting to verify your origin on the Edgemesh Portal.
Copy link
On this page
Create Service Worker
Add Client