30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Update Localisation Settings

litespeed/update-localization-settings changes resource localisation: pulling third-party JavaScript and gravatars onto this server so they are served and cached locally.

The gain is one fewer remote host in the critical path. The cost is that you are now hosting somebody else’s file.

At a glance

Abilitylitespeed/update-localization-settings
ToolsetLiteSpeed Cache — toolset/litespeed
GroupLiteSpeed Cache › CSS, JS & HTML
RequiresLiteSpeed Cache, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

What you take on by hosting it

A third-party script fetched on every visit costs a DNS lookup, a connection and a round trip to a host you do not control. Localising it removes all three and lets your own cache headers apply.

What you take on is the update. A remote script that the vendor changes updates itself; a localised copy updates when LiteSpeed refetches it, which is on its own schedule. For a library that is the point — stability. For a tag that the vendor patches for a bug, it is a delay.

Some scripts genuinely cannot be localised. Anything that identifies the requesting domain server-side, anything served with a per-request token, anything whose terms require it to be loaded from the vendor — localising those breaks them or breaches the terms.

Gravatars are the easy case: they are images, they change rarely, and hosting them locally removes a request to an external service from every page with a comment on it. It also removes a privacy leak, since fetching a gravatar tells that service which page the visitor is on.

The write is a patch, not a replacement. Send one key and one key changes; everything else in the area is left alone. The response names the keys that actually moved, so a payload that matched the existing values comes back with an empty list rather than a misleading success.

Input

NameTypeRequiredWhat it is
settingsobjectYesA map of setting key to new value. Keys outside this area are refused, and the refusal lists what the area accepts.

What comes back

NameTypeWhat it is
updatedarrayThe keys that actually changed. An empty array means every value you sent was already set.
settingsarrayEvery setting in the area after the write, in the read shape.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Serve gravatars from our own server.

It resolves to one call:

{
  "ability": "litespeed/update-localization-settings",
  "parameters": {
    "settings": { "optm-localize": true }
  }
}

Worth knowing

  • A localised script updates on LiteSpeed’s schedule, not the vendor’s.
  • Scripts with per-request tokens or domain checks cannot be localised.
  • Localising gravatars removes a per-page request to an external service.
  • Check the vendor’s terms before localising a commercial tag.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading