Details
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:
- 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.
- AJAX request from hidden script to retrieve the real content of the first child component through a Component Rendering URL.
- 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
- relates to
-
HSTTWO-4637 Add searchEngineOrBot request flag in page cache key
- Closed