How can I return the fully rendered page to Google crawler? #57477
Replies: 1 comment
-
And the answer is, fully render the page on the pre-render call to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all;
Is there a way, when using Blazor in Interactive Server mode, to set a page (or 2 in my case) to not return the static html first, then do the two passes calling
OnInitializedAsync()
but instead fully render the page as the first response to a request for the page?Here's why:
It looks like the Google crawler gets the static page (pre calling OnInitializedAsync) for a page. This is for a Blazor Interactive Server app.
I need to populate both the
<PageTitle>
and<HeadContent>
with data from the database. From my testing the web page shows, as expected:But the Google Rich Result Test shows:
Where the
{}
is what my code behind returns if it does not yet have the data read from the DB.I asked about this on Microsoft Q&A (2nd answer) and got this answer (from an individual there who knows Blazor very well):
So, how can I give the crawler the fully rendered page instead of the initial static html?
??? - thanks - dave
Beta Was this translation helpful? Give feedback.
All reactions