vb-prerender-cache-warm
Warms the prerender server's cache to improve response times for requests made by Googlebot, the main web crawler used for Google search, when indexing your web application's pages.
When a request for a Visual Builder page is received from Googlebot (or any other search engine), the request is routed through the prerender server embedded in Visual Builder. The prerender server loads the page and runs any JavaScript required to fully render that page before returning the page to Googlebot. This way, Googlebot always receives a fully rendered page for indexing.
Once the prerender server renders a URL, the page is cached, so markup can be returned immediately for subsequent requests for the same URL. If markup is not yet cached, the process of rendering the page can take some time. Typically, Googlebot waits until this process completes—but it is recommended that you warm the prerender server's cache for URLs in your application's sitemap, so Googlebot always gets the fastest possible response when requesting those URLs.
Use the vb-prerender-cache-warm
task to warm up the prerender server's cache after your application (or a new version of it) is deployed.
Note:
Before warming the cache, ensure that you have an up-to-datesitemap.xml
file as part of the application's sources. See Add a Sitemap to a Web App's Resources.
vb-prerender-cache-warm
task:
Detail | Description |
---|---|
subtasks | n/a |
multitask | n/a |
hooks | n/a |
input | path_to_web_app's_sitemap_file |
output | Prerender server cache populated |
vb-prerender-cache-warm
task:
Name | Mandatory | Default Value | Description |
---|---|---|---|
id | yes | n/a | Web application's ID, for example, MyApplication .
|
ver | yes | n/a | Web application version, for example, 1.0 .
|
url[:dt] | yes | n/a | URL of the Visual Builder design-time service, for example, https://my.visualbuilder.com/ic/builder . The :dt suffix is optional.
|
sitemap | no | sitemap.xml | Path to the sitemap.xml file on the file system, for example, webApps/myWebApp/sitemap.xml .
|
manifest | no | manifest.json | Path to the manifest.json . This file tracks what has been prerendered successfully, so that the process can be re-run if necessary. For example, if entries change in sitemap.xml , the process will determine which entries have changed and warm those alone. This file also stores details on any URLs that were not successfully retrieved so they can be retried.
|
userAgent | no | Default Chrome user agent | User agent to use when requesting the page. |
clearCache | no | false | Set this flag to true to clear the cache before starting to warming it. This flag is recommended when a new version of the application is deployed because any existing cached pages will contain broken asset links.
|
See Warm the Cache for URLs in a Sitemap for examples of how you can use this task.
vb-prerender-cache-warm
task uses the same authentication options as other Grunt tasks that connect to the server:
Name | Mandatory | Default Value | Description |
---|---|---|---|
username | no | n/a | The username to be used to obtain OAuth access token for further communication with Visual Builder runtime. |
password | no | n/a | The password to be used to obtain OAuth access token for further communication with Visual Builder runtime.
A password specified via the |
accessToken | no | n/a | The value of the OAuth access token. If provided, username and password options are not necessary. |
sslCertificate | no | n/a | The path to the SSL certificate for the connection to Visual Builder instances provisioned with self-signed certificates. |