Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4627

Disable AJAX Asynchronous HST Component Rendering on requests from web crawlers

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 13.4.0, 14.0.0
    • None
    • None
    • Solutions team Sprint 214

    Description

      The "Asynchronous HST Components and Containers" feature [1] renders some "ajax" mode Asynchronous HST Components in separate requests through Component Rendering URL [2] after the initial page load.

      For example, suppose, in a page, the root component has only two child components and the two child components are configured with @hst:async = true (@hst:asyncmode = "ajax" by default). Then three requests are made for the single page:

      1. The initial page load with the root component, a placeholder tag for the first child component and a placeholder tag for the second child component.
      2. AJAX request from hidden script to retrieve the real content of the first child component through a Component Rendering URL.
      3. AJAX request from hidden script to retrieve the real content of the second child component through a Component Rendering URL.

      One downside with this approach is that it could have a shortcoming in SEO perspective. Most web crawlers from the search engines including Google may not read the content of the child components that are retrieved through separate requests, resulting that the content of this children are not analyzed/indexed properly.

      It would be a nice improvement if HST Container simply disables the async component rendering, regardless of configuration, when the request is coming from web crawlers. By checking the "User-Agent" header for example.
      Then, the solution will be much nicer, supporting SEO requirements properly.

      By the way, there's already some code disabling async rendering option at runtime regardless of configuration: AggregationValve disables it if the request comes from channel manager. See AggregationValve#isAsync(HstComponentWindow, HstRequest).
      So, if it is improved for this feature by either simple extension point or nice configurable feature (e.g, crawler user agent pattern configurations), it will be really great.

      [1] Asynchronous HST Components and Containers, https://documentation.bloomreach.com/library/concepts/component-development/asynchronous-hst-components-and-containers.html
      [2] https://documentation.bloomreach.com/library/concepts/links-and-urls/the-componentrenderingurl.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wko Woonsan Ko (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: