God, we have that. And there's also no data persistence. So, if you set cookies, if you go to local store, you say, okay, I'll set some settings, this will be cleared. And there's a so-called scroll budget. If you have lots of files, Google is caching them, but of course, it should be fair amount for every website. So they have a budget that's not disclosed, but if you have lots of big data, like big JavaScript files, images, they will scroll the pages slower than others.
And also, of course, there's a timeout thing, so if you load data through SPA, you have the loading spinner maybe, sure. But at some point, Google might not index content that comes in very late. Yeah, that's for crawling, and SPAs also have some caveats. For example, if you share your favourite link on, let's say, Discord, with your friends, or WhatsApp or wherever, then usually you have a nice preview image and title, description. And for SPAs, it's a bit difficult, because usually the preview images come from the HTML, which is not there by default, because it's generated through JavaScript. So always, a bit of a problem here, there's no preview or a default preview image, and the experience could be way better.
Also, we just learned no JavaScript, no content. If you have HTML and make a mistake, it's a bit more forgiving, but with JavaScript, it's like, yeah, one mistake could lead the whole site to not work anymore. And especially for Vue, you can't reuse fragment routing anymore. This applies to any framework. But for Vue router it's also important you need real URLs. If you only use a fragment, that won't work for Google. Actually, this fragment part is not even processed in the back end. It won't reach the back end, even. So you need actual URLs, the history mode. Which means it's a little bit more work to set up for multipage applications, especially if you have your own web server and so on, anyway. And if there's one thing to quote from this talk, it's this. Even if it doesn't matter, it's fine, Google can index my page, it's all good. But it does not mean it will rank well. Just because Google can understand your website and see it, it doesn't mean it's the best page ever. So maybe, in this case, also client-side rendering might not be enough. And what else can we do there? Well, you already know the answer. Server-side rendering. Nice.
Comments