-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SAPPER] Routing between dynamic pages issue #59
Comments
Will track in #9 |
Your example loads the client from the cache, but how would a bot scanning your site load cache to get ssr meta data? |
First of all - it's not my example, I just found a repository that represents the same issue 🤗 And the second one - when you get the first load Sapper will generate flat HTML and then hydrate it. |
@zamkevich Ok, thanks. I wasn't sure if it was cached on the actual server or not, as that would be useful for ssr search bot. Not sure how that is solved. |
@jdgamble555 It's achieved by run preload function on BFF for the first load. The function get all data and put into HTML. After hydration, all next calls the Preload function will be run on the client. All requests must be isomorphic (works for Node and Browser environment). |
@zamkevich Does it actually update the HTML before it is loaded or does it update it VIA javascript? For example: A search engine bot cannot read javascript, but it can read html/meta tags etc. Can I change the source html from the server this way? |
@jdgamble555 Yes, you can. |
Faced a problem: when I navigate from a dynamic route to the same level page, the url is updated, the gql requests data, but the page is not redrawn. Only if I use hard reload.
Code example with the same issue: https://github.com/EddyVinck/sapper-graphql-template/blob/dev/src/routes/blog/%5Bslug%5D.svelte
The reason:
https://github.com/sveltejs/sapper/issues/1278
The text was updated successfully, but these errors were encountered: