To get better at JavaScript, Google officially announced support for Dynamic Rendering at the end of 2018. The goal of the technology is to provide search engine crawlers with a rendering page while providing users with a client-side experience.
In its blog titled IMPLEMENT DYNAMIC RENDERING, Google states–
“Currently, it’s difficult to process JavaScript, and not all search engine crawlers are able to process it successfully or immediately. In the future, we hope that this problem can be fixed, but in the meantime, we recommend dynamic rendering as a workaround solution to this problem. Dynamic rendering means switching between client-side rendered and pre-rendered content for a specific user agent
HOW A DYNAMIC RENDERING BASED WEBSITE WORKS
To understand how a site with a dynamic display works, you have to understand how a website works as given below.
When you visit a website, the client (your browser) will send a request to the server which will itself fetch the content of the page from the database. This returns the data allowing the server to transmit them to the client so that it can interpret them. This is how the web page is made visible to the browser.
Many sites use JavaScript to dynamically generate client-side HTML code that will render the page to the user.
BUT this operation is misunderstood by search engine robots and can become very detrimental to the referencing of a site.
The concept of Dynamic Rendering works on the same principle as a classic site except for a few details. Indeed, a different page will be returned depending on the source issuing the request to the server:
The request is issued by a browser, the server will return a page as it would normally. The request is issued by a search engine crawler, the server will return the same content in the form of static pages understandable to robots.
This method, therefore, makes it possible for robots to understand pages that would have been difficult to interpret because of the JavaScript executed on the client side.
To send robots the version of the site dedicated to them, the server must be allowed to detect user agents.
It is therefore cloaking – a practice that goes against Google’s recommendations – but “clean” according to Google, which recommends this method, since it is the same pages that are presented to users and robots.
WHAT ARE THE BENEFITS OF DYNAMIC RENDERING FOR SEO?
The advantages of such a method for the natural referencing of a site are numerous, as we have seen the robots not having JavaScript to interpret the risks of misunderstanding and non-indexing of the pages are eliminated.
Pages are also crawled much faster by robots.
However, many risks remain in the use of this technology and two of them alone deserve to question the use of this method:
If the contents returned by the server are not strictly identical, the cloaking will no longer be clean and the site risks being penalized.
If user-agent detection is misconfigured, the whole site can suffer.
Adding to these two examples the fact that Dynamic Rendering is difficult to implement and to test are all good reasons to think about an alternative.
The JAMstack: Can It be Used as an Alternative to Dynamic Rendering?
To have a fast and crawlable site while using technologies built-in JavaScript, the JAMstack seems to be a serious alternative to Dynamic Rendering.
But what is the JAMstack?
JAM for JavaScript, APIs, and Markup is a way to build static sites — for simplicity of implementation — without a database and whose development is easy to understand.
For example, when a user wants to display a CMS page, the server will have to make a large number of requests to the database and interpret the PHP to assemble all the data with the theme and other plug-ins. Thus the browser will be able to render the page following a complex operation.
At a time when browsers are much more powerful than in the past and able to interact with several APIs, this model may seem obsolete.
The JAMstack, therefore, makes it possible to go beyond this model and generate the HTML code of a page upstream and to distribute the pages of your site via a CDN. Each time a user wants to see your site, he will send a request to the CDN which will return a page that has already been built.
The benefits in terms of performance and security but also and above all of SEO are significant.
JAMstack and SEO
The JAMstack allows you to get rid of some hassles related to CMS and their way of generating pages. Indeed on CMS, the writing of URLs, as well as category pages and other tags or archives, are points of perpetual vigilance since they potentially generate content duplication. It is possible to neutralize this threat using canonical URLs and noindex directives managed by plugins which make the process more cumbersome. A static site generator will allow you to more effectively understand the construction of pages and their rendering.
And if the rendering is effective for users, it will also be effective for robots.
Performance:
Since the pages are delivered from a CDN without multiple database queries being made, site performance is undeniably improved. Pages will display much faster for the user, optimizing their experience. These two factors can only be beneficial to the SEO of the site concerned.
Security:
Who says the absence of database and plug-in says the absence of attempted hacks. Statically generated sites are impregnable and much less vulnerable than a CMS.