RemoteAsset
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
In these examples, multiple connections are competing for resources, are accelerating download independently and are improperly prioritized.
The following example retrieves assets from multiple CDNs:
The following example doesn't use the image_url
filter to retrieve the image.
Anchor to ✓ Pass✓ Pass
In the following examples, JavaScript, CSS and images are all loading from the same connection. The browser and CDN can properly prioritize which assets are downloaded first while maintaining a "hot" connection that downloads fast.
This can be done by downloading the files from those CDNs directly into your theme's assets
directory and using the image_url
filter for images, as in the following example:
Anchor to OptionsOptions
The following example contains the default configuration for this check:
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Consider disabling this check the remote content that you're retrieving is highly dynamic.
Anchor to AliasesAliases
For backward compatibility with configuration files made for Theme Check v1.X.X
, this check is also recognized in configuration files with the following name:
AssetUrlFilters