script_​management

Version: v2025-01-13Includes use: No

Behavior name: Script Management

Ensures unresponsive linked JavaScript files do not prevent HTML pages from loading. See Script Management API for more information.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "script_management" {
  rules_v2025_02_18 {
    name     = "Script Management"
    comments = "Ensures unresponsive linked JavaScript files do not prevent HTML pages from loading."
    behavior {
      script_management {
        enabled        = true
        service_worker = "YES_SERVICE_WORKER"
        timestamp      = 0
      }
    }
  }
}
"behaviors": [
  {
    "name": "scriptManagement",
    "options": {
      "enabled": true,
      "serviceworker": "YES_SERVICE_WORKER",
      "timestamp": 0
    }
  }
]

Options

Option Description
enabled
Enables the Script Management feature.
serviceworker
Script Management uses a JavaScript service worker called akam-sw.js. It applies a policy that helps you manage scripts. Value is one of:
  • YES_SERVICE_WORKER. Review insights about script usage, and create a policy to list scripts you want to defer or block. This also installs the akam-sw.js service worker for you.
  • NO_SERVICE_WORKER. Review insights about script usage. The akam-sw.js service worker isn't installed.
timestamp
A read-only epoch timestamp that represents the last time a Script Management policy was synchronized with its Ion property.