SEO Page Generator

SuiteCommerce web stores use single-page application (SPA) technology to provide a rich and performant experience to users. When a user first visits a website built using an SPA, they load a single HTML page that uses JavaScript to build an interactive web application in their browser. After the SPA has been built in the user's web browser, subsequent interactions the user has with the website happen within this application—this means reusing templates and previously loaded data, and only loading new data that is required. Overall, this boosts web performance by making loading times between page transitions and soft navigations faster, as only the data required for the specifics of that page are loaded from the server.

However, many search engines, such as Google and Bing, send crawlers to websites that might not render JavaScript. Therefore, providing them with the same SPA technology that human users use could be problematic. To ensure that web stores are discoverable and indexable by the search engine crawlers, an alternative approach is used.

To support search engine crawlers, server-side rendering (SSR) is used instead—this is what we call the SEO page generator. The SEO page generator is a virtual web browser that is sent the crawler's requested page, executes the SPA JavaScript, and then sends the HTML content to the crawler. This means that the crawler receives prerendered pages, and never has to run JavaScript.

Performance Optimizations

Note that the value of the SEO page generator is that it serves prerendered content to users such as search engine crawlers, who may benefit from it. Prerendering content using SSR has a performance cost and, therefore, in certain situations, the page generator is set up to not run when it is not required. Skipping prerendering means SSR content is not produced and loading performance is improved. These optimizations include:

  • When CDN Caching is enabled on a website, prerendered pages are stored for a short period of time so that they can be sent to other users who request the same page. The page generator will not run because a fresh version of the content is already available.

  • User agent detection is used to see if the requesting user identifies as a web crawler or other bot. The page generator will not run if the system is highly confident that the requesting user is a human.

  • The page generator will not run when a user is logged in or in a recognized state. For more information, see Roles.

    This includes public and private parts of the website, for instance, shopping, checkout and My Account.

  • Some JavaScript will not be loaded if it is not useful for web crawlers. For example, the Application Performance Management (APM) for Commerce library will not be requested if the page is being processed by the page generator. Developers can exclude custom resources from being included in the prerendered HTML by following the SEO Page Generator Best Practices.

  • The page generator will not run if you request a page in a local developer environment using the Commerce developer tools. For more information, see Tools Overview.

To learn more about the SEO page generator, refer to the following sections:

Related Topics

General Notices