regionalSettings


regionalSettingsstringRead-only

Gets the site's regional settings.

The retrieved regional settings corresponds to the regional settings that has been entered in the General Info section of your site's Dashboard.

The regional settings are used to determine how numbers, dates, and currencies are displayed on your site.

Get the site's regionalSettings
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const regionalSettings = wixSiteFrontend.regionalSettings; // "en-us"
Did this help?

revision


revisionstringRead-only

Gets the site revision ID.

The site revision ID is a unique identifier for the current revision of your site. Each time you manually save your site or publish your site following a change, a new revision is created.

You can view and manage your site revisions in your Site History. You can use site monitoring to monitor and debug new revisions of your site.

Notes:

  • Since publishing your site may change the revision ID, the ID when previewing your site may be different than the ID for the published site.

  • The site revision ID is guaranteed to be unique, but not meaningful. Therefore, you cannot predict future revision IDs before they are created.

Get the site revision ID
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const revision = wixSiteFrontend.revision; // "4x2y"
Did this help?

timezone


timezonestringRead-only

Gets the site's timezone.

The retrieved timezone is the timezone that has been entered in the General Info section of your site's Dashboard.

The timezone is used your site, apps (e.g. Wix Stores, Wix Bookings), and other Wix features.

Get the site's timezone
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const timezone = wixSiteFrontend.timezone; // "America/New_York"
Did this help?

wixRouterSitemapEntry


wixRouterSitemapEntryWixRouterSitemapEntryRead-only
Did this help?

getSiteDisplayName( )


Gets the site display name.

Retrieves the site display name, which is the name that has been entered in the Website Settings section of the site's Dashboard.

Method Declaration
Copy
function getSiteDisplayName(): string;
Request
This method does not take any parameters
Returns
Return Type:string
Get the site display name
JavaScript
import wixSiteFrontend from "wix-site-frontend"; const siteName = wixSiteFrontend.getSiteDisplayName(); // "My Site"
Did this help?

getSiteStructure( )


Returns information about the site's pages, prefixes, and lightboxes.

The returned SiteStructure object is a flattened representation of the site. The structure does not include the headers and links from the site's Pages menu.

Method Declaration
Copy
function getSiteStructure(): SiteStructure;
Request
This method does not take any parameters
Returns
Return Type:SiteStructure
Get information about the site's pages, prefixes, and lightboxes

This example gets the structure of the site with the following in its pages menu: Site Structure

JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const structure = wixSiteFrontend.getSiteStructure(); /* * { * "pages": [ * { * "name": "Home", * "type": "static", * "url": "/home", * "isHomePage": true * }, * { * "name": "Page 1", * "type": "static", * "url:" /page-1" * }, * { * "name": "Page 2", * "type": "static", * "url": "/page-2" * }, * { * "name": "Parent Page", * "type": "static", * "url": "/parent-page" * }, * { * "name": "Child Page", * "type": "static", * "url": "/child-page" * }, * { * "name": "router-page", * "type": "template", * "prefix": "router" * }, * { * "name": "MyCollection (Title)", * "type": "template", * "prefix": "MyCollection" * }, * { * "name": "MyCollection (All)", * "type": "template", * "prefix": "MyCollection" * }, * { * "name": "Dashboard Page", * "type": "static" * }, * { * "name": "Shop", * "type": "template", * "url": "/shop", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Product Page", * "type": "template", * "url": "/product-page", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Thank You Page", * "type": "template", * "url": "/thank-you-page", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Cart", * "type": "template", * "url": "/cart", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Members", * "type": "template", * "url": "/members", * "applicationId": "14ad9202-3dd3-128a-57bd-e5675fd7e313" * } * ], * "prefixes": [ * { * "name": "router", * "type": "router", * "prefix": "/router" * }, * { * "name": "MyCollection", * "type": "dynamicPages", * "prefix": "/MyCollection" * }, * { * "name": "MyCollection", * "type": "dynamicPages", * "prefix": "/MyCollection" * }, * { * "name": "Shop", * "type": "app", * "prefix: "/shop", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Product Page", * "type": "app", * "prefix": "/product-page", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Thank You Page", * "type": "app", * "prefix": "/thank-you-page", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Cart", * "type": "app", * "url": "/cart", * "applicationId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" * }, * { * "name": "Members", * "type": "app", * "prefix": "/members", * "applicationId": "14ad9202-3dd3-128a-57bd-e5675fd7e313" * } * ], * "lightboxes": [ * { * "name": "Welcome (Full Screen)" * } * ] * } */
Did this help?

prefetchPageResources( )


Optimizes resource fetching of pages and lightboxes in the site so they will load faster.

Use the prefetchPageResources() function to optimize resource fetching of pages and lightboxes you think your site visitors are likely to visit next. When the site visitor navigates to those pages or lightboxes, they will load quicker than usual since some of their resources have already been retrieved.

You can only prefetch resources from pages or lightboxes within the current site.

A prefetch is considered successful if the specified pages and lightboxes exist in the current site. If any of the specified pages or lightboxes do not exist, the prefetch operation returns an error status and lists of the pages and lightboxes that were not found.

Method Declaration
Copy
function prefetchPageResources(prefetchItems: PrefetchItems): PrefetchResult;
Method Parameters
prefetchItemsPrefetchItemsRequired

The items within the site to prefetch resources for.

Returns
Return Type:PrefetchResult
JavaScript
const response = wixSiteFrontend.prefetchPageResources({ lightboxes: ["First Box", "Second Box"], pages: ["/first-page", "/second-page"], }); if (response.errors) { // handle errors } /* * response is: * * { * "message": "success" * } */
Did this help?

routerSitemap( )


Returns the sitemap for a router or dynamic page prefix.

The routerSitemap() function returns a Promise that resolves to a list of WixSitemapEntry objects. Each WixSitemapEntry includes information about a page, such as its URL, title, and name.

A sitemap is used by search engines to find the links to the site's pages.

Method Declaration
Copy
function routerSitemap(
  routerPrefix: string,
): Promise<Array<WixRouterSitemapEntry>>;
Method Parameters
routerPrefixstringRequired

The prefix of the router to get the sitemap for.

Returns
Return Type:Promise<Array<WixRouterSitemapEntry>>
Get the sitemap for a prefix
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... wixSiteFrontend.routerSitemap("routerPrefix").then((routerSitemap) => { const sitemap = routerSitemap; }); /* * sitemap: * * [ * { * "url": "Ash", * "lastModified": null, * "changeFrequency": "", * "priority": null, * "title": "Ash Stowe", * "pageName": "Ash's Page" * }, * { * "url": "Aiden", * "lastModified": null, * "changeFrequency": "", * "priority": null, * "title": "Aiden Johnson", * "pageName": "Aiden's page" * }, * { * "url": "Jess", * "lastModified": null, * "changeFrequency": "", * "priority": null, * "title": "Jess White", * "pageName": "Jess's page" * }, * { * "url": "Morgan", * "lastModified": null, * "changeFrequency": "", * "priority": null, * "title": "Morgan James", * "pageName": "Morgan's Page" * } * ] */
Did this help?