Reduced search engine discoverability

The use of the SPA architecture may reduce search engine discoverability. Because of the dynamic nature of rendering content on the client side, some SPA implementations may not produce well-formed HTML content that can be easily consumed by search engine bot crawlers that are used to consuming an initial web page response only.

The search engine bot crawler may not have the capability to render the web page, since it may not be equipped with a JavaScript runtime. Without the fully rendered web page content, the bot crawler cannot effectively perform its duty of consuming the web page's content.

In addition to this, SPA implementations handle routes using fragment identifiers, strings that refer to a resource, after the hash mark (#) of a URL. This approach is not search engine friendly.

Let's return to our e-commerce web application example. In the classic and AJAX web application architectures, our web application could have the following URL: http://igweb.kamesh.com/product-detail/swiss-army-knife.

In the case of the SPA implementation, the URL, with a fragment identifer, could look like this:
http://igweb.kamesh.com/#section=product_detail&product=swiss-army-knife

This URL would be difficult for a search engine bot crawler to index because the fragment identifier (the characters after the hash symbol) is meant to specify a location within a given web page. 

Fragment identifiers were designed to provide links within sections of an individual web page. The fragment identifier influences the web browser's history since we can tack on unique identifiers to the URL. This effectively, prevents the user from encountering a full page reload.

The shortcoming of this approach is that fragment identifiers are not included in the HTTP request, so from a web server's perspective, the URL, http://igweb.kamesh.com/webapp#orange, and the URL, http://igweb.kamesh.com/webapp#apple, are pointing to the same resource: http://igweb.kamesh.com/webapp.

The search engine bot crawler would have to be implemented in a more sophisticated manner to handle the complexity of indexing websites containing fragment identifiers. Although Google has made considerable progress on this problem, implementing URLs, without the fragment identifiers, is still the recommended best practice to ensure websites are easily indexed by search engines.

It is important to note is that in some cases, the SPA architecture may overcome this disadvantage, using more modern practices. For example, more recent SPA implementations avoid fragment identifiers altogether, using the web browser's History API to have more search engine friendly URLs.

Wish list item #6: To promote discoverability, the website should provide well-formed HTML content that is easily consumed by search engine bots. The website should also contain links that are easily indexed by search engine bots.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.240.196