Closed mauricionr closed 6 years ago
if i have two await's in one page, the second await only will be triggered after the first one?
There were no changes related to client-reorder
when going from Marko v3 to Marko v4.
The benefit of client-reorder
can be seen in Slides: Marko ❤️ Node.js (slide 14, "out-of-order flushing" row)
if i have two await's in one page, the second await only will be triggered after the first one?
The will be triggered synchronously since there is no blocking (essentially, they will be triggered on the same tick, but won't be rendered until the associated promise resolves). Marko will take care of flushing the HTML output in the correct order.
@patrick-steele-idem but client-reorder
affect SEO right?
the crawlers are not able to crawl the contet because they are hidden :thinking:
@mauricionr That is true, however you can detect if a crawler is accessing the site and turn off client-reorder
. Another thing @mlrawlings mentioned before is disabling client-reorder
until you are positive JavaScript is working by setting a cookie in the browser and detecting it server side to enable client-reorder
which I think is a decent approach.
Thanks @DylanPiercey !
i could not understand this part
Another thing @mlrawlings mentioned before is disabling client-reorder until you are positive JavaScript is working by setting a cookie in the browser and detecting it server side to enable client-reorder
:thinking:
@mauricionr basically you add a script that does this:
document.cookie = 'use-client-reorder=1'
And then in the server check that cookie and only use the client-reorder feature if that cookie was set in the browser. (It would not work for initial render)
With markojs 4, anything change for
client-reorder
?what the benefit for using
client-reorder
?Thanks :smile: