Configuration

Edgemesh® Client can be configured using the EDGEMESH global. It must be defined before the Edgemesh® Client script is loaded.

Example
<script type="application/javascript">
EDGEMESH = {
lite: true
}
</script>
<script
async
type="application/javascript"
src="https://static.edgeme.sh/client.js">
</script>

Properties

Below are the available configuration options for Edgemesh® Client:

lite

description

Lite mode disables the Edgemesh client-side caching engine. Customers that want to use Edgemesh only for its B2B Analyzer and Real User Metrics will want to set this to true.

type
boolean
default
false

host

description

Host of the Edgemesh back end. Don't change this unless instructed to by your dedicated Edgemesh Engineer (Enterprise feature).

type
string
default
https://api.edgeme.sh

swUrl

description

Pathname of the Edgemesh service worker. Set this option if you have your service worker installed at a non-standard path. Make sure you understand how service worker scope works if you change this option.

type
string
default
/sw.js

scope

description

Scope of the Edgemesh service worker. This option sets the root from where the service worker will intercept and cache requests. If you want to enable Edgemesh caching for only a subpath, you can set this option. The value must be a path that is a descendent of the service worker's installed path unless you have the Service-Worker-Allowed header set.

type
string
default
/

topicDepth

description

If your domain has different websites on subdirectories, you can use topicDepth to separate them. For instance example.com/us and example.com/uk are different websites, setting topicDepth to 1 will include one slash after the hostname in the unique identifier for the site. You will be able to register each domain separately allowing you to isolate metrics in the portal. It also allows larger sites to shard more effectively. Every site (subpath) must be registered in the Edgemesh Portal.

type
number
default
0

prefetch

description

When set to true, the Edgemesh Client will scan the current page for potential user navigation paths and intelligently prefetch the most likely to be viewed pages.

type
boolean
default
false

Made withby Edgemesh Corporation