Config Client

The Edgemesh® Client configuration provides various options that can be set in the Portal and by the API. These options define how Edgemesh® Client will operate on your site.

Get Config

GET

Returns the current Edgemesh® Client configuration.

Request Parameters


REQUIRED
The hostname of the domain to retrieve the configuration for.

Response Properties


image
boolean
Cache image resources.

video
boolean
Cache video resources.

audio
boolean
Cache audio resources.

stylesheet
boolean
Cache stylesheet resources.

font
boolean
Cache font resources.

Cache application resources.

archive
boolean
Cache archive resources.

document
boolean
Cache document resources.

html
boolean
Cache HTML (navigation) resources.

lite
boolean
Enable lite (metrics only) mode.

prefetch
boolean
Enable intelligent prefetching.

pause
boolean
Pause caching.

shopify
boolean
Enable the Shopify Plugin.

The Shopify Plugin enables a local state machine for cart routes to prevent /cart.js and /cart.json calls from hitting the Shopify servers on every request. This significantly improves cart performance and mitigates rate limiting by the Shopify backend.

URL
https://api.edgemesh.com/2022-08/config/client
Extensions
image bmp, bpg, eps, gif, ico, jpeg, jpg, pict, png, svg, svgz, tif, tiff, webp
video amv, avi, drc, f4bogv, f4p, f4v, flv, gifv, m2v, m4v, mkv, mov, mp2, mp4, mpe, mpeg, mpg, mpv, qt, webm, wmv, 3g2, 3gp
audio aac, aiff, f4a, flac, m4a, m4p, mid, midi, mogg, mp3, ogg, oga, opus, ra, rm, wav
stylesheet css
font ttf, otf, woff, woff2, eot
application js, json, swf, wat, wasm
archive apk, bz2, dmg, gz, iso, jar, lz, lzma, rar, tar, tbz2, tgz, tlz, txz, xz, z, zip, zipx, 7z
document doc, docx, otf, pdf, ppt, pptx, ps, xls, xlsx
html htm, html, mode = navigation
GETGet Client Config
1curl https://api.edgemesh.com/2022-08/config/client?hostname=example.com /
2 -H 'X-API-Key: EM-0000000-0000000-0000000-0000000' /
3 -H 'Accept: application/json'
Example Response
1{
2 "image": true,
3 "video": true,
4 "audio": true,
5 "stylesheet": true,
6 "font": true,
7 "application": true,
8 "archive": true,
9 "document": true,
10 "html": false,
11 "lite": false,
12 "prefetch": true,
13 "pause": false,
14 "shopify": false
15}

Update Config

PUT

Update the Edgemesh® Client configuration. Any of the configuration options set in the request body will be updated. The omitted options will remain unmodified.

Request Parameters


hostname
string
REQUIRED
The hostname of the domain whose cache will be purged.

image
boolean
OPTIONAL
Cache image resources.

video
boolean
OPTIONAL
Cache video resources.

audio
boolean
OPTIONAL
Cache audio resources.

stylesheet
boolean
OPTIONAL
Cache stylesheet resources.

font
boolean
OPTIONAL
Cache font resources.

OPTIONAL
Cache application resources.

archive
boolean
OPTIONAL
Cache archive resources.

document
boolean
OPTIONAL
Cache document resources.

html
boolean
OPTIONAL
Cache HTML (navigation) resources.

lite
boolean
OPTIONAL
Enable lite (metrics only) mode.

prefetch
boolean
OPTIONAL
Enable intelligent prefetching.

pause
boolean
OPTIONAL
Pause caching.

shopify
boolean
OPTIONAL
Enable the Shopify Plugin.

The Shopify Plugin enables a local state machine for cart routes to prevent /cart.js and /cart.json calls from hitting the Shopify servers on every request. This significantly improves cart performance and mitigates rate limiting by the Shopify backend.


Response Properties


ok
boolean
Whether or not the request succeeded.
URL
https://api.edgemesh.com/2022-08/config/client
Extensions
image bmp, bpg, eps, gif, ico, jpeg, jpg, pict, png, svg, svgz, tif, tiff, webp
video amv, avi, drc, f4bogv, f4p, f4v, flv, gifv, m2v, m4v, mkv, mov, mp2, mp4, mpe, mpeg, mpg, mpv, qt, webm, wmv, 3g2, 3gp
audio aac, aiff, f4a, flac, m4a, m4p, mid, midi, mogg, mp3, ogg, oga, opus, ra, rm, wav
stylesheet css
font ttf, otf, woff, woff2, eot
application js, json, swf, wat, wasm
archive apk, bz2, dmg, gz, iso, jar, lz, lzma, rar, tar, tbz2, tgz, tlz, txz, xz, z, zip, zipx, 7z
document doc, docx, otf, pdf, ppt, pptx, ps, xls, xlsx
html html, html, mode = navigation
PUTUpdate Client Config
1curl https://api.edgemesh.com/2022-08/config/client /
2 -X PUT /
3 -H 'X-API-Key: EM-0000000-0000000-0000000-0000000' /
4 -H 'Accept: application/json' /
5 -d '{ "hostname": "example.com", "img": true, "video": true, "audio": true, "stylesheet": true, "font": true, "application": true, "archive": true, "document": true, "html": false, "lite": false, "prefetch": true, "pause": false, "shopify": false }'
Example Response
1{
2 "ok": true
3}

Made withby Edgemesh Corporation