Optional policy features
In addition to setting up a standard Script Management policy to manage your scripts, you can apply some optional features.
Add Single Point of Failure Protection
Single-Point-of-Failure (SPOF) helps protect against outages caused by third-party JavaScripts. If you enable it, a call for a script is moved to the background if that script is slowing down page load times for your site.
SPOF dynamically sets a timeout value based on current network conditions. If a script takes longer to load than this timeout period, it moves the script to the background. The timeout value is adjusted automatically if network conditions change.
You can set the timeout
If you want to use a fixed value for the SPOF timeout, click Advanced Settings. Set a start and end range in seconds to serve as the timeout.
Add an Override List
Override List functionality is only available to policies created in the Script Management dashboard on Akamai Control Center.
If you know of particular third-party scripts you want to defer or block, you can set up an override list to specifically target them. You can also use one to manage third-party scripts that regularly change their name or version number. While editing a policy, click the Override List button to create one. Add entries to the list using the methods discussed below. You can combine both methods in a single list.
Use regular expression
You can use a regular expression (regex) to define a range of scripts. This is the method you'll need to use if you want to target scripts that regularly change their name or version number.
-
Click the Regex tester to open it.
-
Enter a regex of up to 256 characters in the Regex field that you want to match on third-party scripts running on your site, for example,
(http|https)://www.(vanity|vanity1).com/(.*)
. -
Enter a value in Test String to see if it's a script name that's captured by the Regex you entered —for example,
https://www.vanity.com/scriptx.js
. -
Click Test Regex:
- You see "The test string matches the regex". Copy and paste the Regex value into the Regex or script URL field.
- You see "test string doesn't match the regex. Repeat steps 2-4, but edit the Regex or Test String values you provided.
-
Set the other options for the entry, as necessary:
- Category (optional). You can enter a Category to describe the type of functionality that the script provides. For example, Analytics, Advertising, or Security.
- Group (optional). You can enter a group name to help organize scripts that are part of the same application. Use the same name with other entries to include them in the same group.
- Action (required). Select how the script should be handled once it's identified, Defer to postpone the script from loading until its associated page is reloaded, or Block to completely prevent the script from loading.
- Click Add Script. The entry is added to the table.
Use the script URL
You can add a specific script to your override list to defer or block it.
-
Enter the full URL to the script in the Regex or script URL field.
-
Optionally set a Category or Group, and then set the Action you want to be applied for the script. They're applied the same for a regular expression entry. (See step 5, above.)
- Click Add Script. The entry is added to the table.
Caveats and key points
Consider these points when including an override list:
-
An override list takes precedence over a policy. If the same script exists in a standard policy and an override list, the Action set in the override list is applied.
-
Scripts in an override list are automatically acted on. When a script in your override list is identified, the Action set for it — defer or block — is automatically applied. An override list doesn't use a timeout the way a policy does.
-
An override list only applies to third-party scripts.
Updated almost 2 years ago