What is SEO Page Generator and it’s best practices.

SEO Page Generator:

Commerce web stores use the Single-Page Application (SPA) model for enhanced user experience. SPAs are web applications that load a single HTML page and dynamically update that page when the user interacts with the site so that the page load time is reduced. Code such as HTML, JavaScript, and CSS are retrieved on the first page load, and pages are not reloaded during customer interaction. The SEO page generator provides static pages to clients unable to render JavaScript code, including social media sites and search engine web crawlers such as Google and Bing. When a shopper or web crawler visits your Commerce web store, the SEO page generator runs the JavaScript code and Ajax requests like a browser would. This builds the HTML content and returns it to the shopper or web crawler. Even shoppers without JavaScript capability receive the HTML content. If the shopper stays on the page and the browser can run JavaScript, subsequent requests are fulfilled by AJAX requests, and the SEO page generator is not engaged. The most frequently requested URLs are cached so search engine bots can index your web store quickly. If the rendered page has already been generated, it is stored in the CDN cache to speed up delivery.

SEO Page Generator Best Practices:

When you customize your Commerce web store, it is important you consider the following SEO page generator best practices:

  • Optimize your JavaScript and use minimal AJAX calls to shorten the time it takes to generate the page HTML. The optimized site can help improve ranking on search results pages because faster loading sites are ranked higher than slower sites.
  • After customizing a page, test it in all main browsers and resolve any JavaScript errors.
  • You should exclude certain elements from SEO page generation. This is useful for embedded, third-party components with external URLs that can consume excessive JavaScript memory or repeatedly poll external URL. The following example demonstrates this exclusion:

if(!SC.isPageGenerator()){

   // Insert non-page generator content here

}

  • Use jQuery instead of DOM for better results in the SEO page generator.
  • In the following situations, wrap the code in a statement to exclude it from SEO page generation:
  • You should not initialize UI intensive jQuery plug-ins on the SEO page generator because they can slow your page down.
  • You should not use the setTimeout() and setInterval() methods on the SEO page generator because they might cause the SEO page generator to timeout.
  • You should not use the animate() jQuery method on the SEO page generator.
  • The Geolocation API is not supported and you must ensure that it is not called in the SEO page generator.
  • For example, you can wrap your code in a statement similar to the following to indicate that it is only for display in the browser:

if(SC.ENVIRONMENT.jsEnvironment === ‘browser’){

  // Insert non-page generator content here

}

  • Use only functions supported by the ECMAScript version 5(ES5) standard.
  • If you are making multiple HTTP requests, and you implicitly rely on certain order of execution, your code may be forced to non-expected code paths or states.

Leave a comment

Your email address will not be published. Required fields are marked *