Understanding how the Coveo JavaScript files are loaded (CDN)
Understanding how the Coveo JavaScript files are loaded (CDN)
Legacy feature
This article pertains to the Coveo Hive framework which is now in maintenance mode. Choose one of Coveo’s more modern, lightweight, and responsive libraries for any future search interface development. See the search interface Implementation guide for more details. |
The Coveo Hive framework renderings rely on the Coveo JavaScript Search Framework.
That’s why Coveo for Sitecore packages include the files of a Coveo JavaScript Search Framework package.
By default, these local files are installed under <SITECORE_INSTANCE_ROOT>\Coveo\Hive\
.
Coveo also hosts Coveo JavaScript Search Framework resources on a Content Delivery Network (CDN).
The Coveo Search Resources rendering gives you the option to reference the local files or to load the Coveo JavaScript Search Framework resources through the CDN.
The CDN removes some load from your site by requesting files located on an external server. Usually, this separation translates into more responsive search interfaces. However, using the CDN exposes you to firewall filtering or other call blocking mechanisms.
Note
The Coveo JavaScript Search Framework CDN base URL is |
Version of Coveo JavaScript Search Framework included in Coveo for Sitecore
Coveo JavaScript Search Framework releases are assigned version numbers in the MAJOR.MINOR.PATCH
format (for example, 2.10099.2
).
The version number of the Coveo JavaScript Search Framework local files included in a Coveo for Sitecore package is mentioned at the beginning of every release note article.
Release note articles also specify the Coveo JavaScript Search Framework MAJOR.MINOR
version that Coveo for Sitecore targets when using the CDN.
This MAJOR.MINOR
version is the very latest MAJOR.MINOR.PATCH
release of the Coveo JavaScript Search Framework.
When a new patch of the Coveo JavaScript Search Framework is released, Coveo updates the CDN MAJOR.MINOR
version to this patch.
Therefore, if you’re using the CDN for a given search interface, that search interface automatically uses the latest patch of the MAJOR.MINOR
release.
Loading Coveo Hive JavaScript resources from the CDN
You can now also load Coveo Hive JavaScript resources from the CDN.
The Coveo Hive CDN base URI is https://static.cloud.coveo.com/coveoforsitecore/ui/<VERSION_NUMBER>
.
Note
If you use the CDN, make sure you allowlist URLs that begin with the following pattern:
|
Switching between the CDN and local files
-
Open the search page in the Experience Editor.
-
Set a data source for the Coveo Search Resources rendering. If it already has a data source, you can skip this step.
-
Find the Coveo Search Resources rendering, which is usually located at the bottom of the page.
-
Select the Coveo Search Resources rendering to display its floating toolbar.
-
In the floating toolbar, select Change associated content.
-
In the Select the Associated Content window, select the parent item for your data source and click create.
-
In the Insert Item window, click Coveo Search Resources, provide a name for your data source, and then click OK.
-
-
With the Coveo Search Resources rendering selected, in the floating toolbar, select the Edit the rendering’s data source option.
-
In the data source options dialog, select whether you want to use the CDN or local files.
-
If you want to load Coveo JavaScript Search Framework and Coveo Hive JavaScript files using the CDN, leave the Use local files for Coveo JavaScript Resources checkbox blank.
-
To use the default version of the CDN files, leave the Coveo JavaScript Search Framework CDN Version field blank.
Coveo for Sitecore uses the appropriate version of the CDN by default. Coveo can’t guarantee your Coveo for Sitecore version works with a more recent version of the Coveo JavaScript Search Framework than the one your Coveo for Sitecore version has been coded for and tested with.
To reference a more recent version of the Coveo JavaScript Search Framework, see the Coveo Search Resources data source options.
-
-
To rely on Coveo JavaScript Resources local files, select Use local files for Coveo JavaScript Resources.
-
To use the default location fo the resources (that is,
/Coveo/Hive
), leave the Resources local path field blank.Otherwise, specify the path to the resources files in the Resources local path field.
-
-