(no title)
das_keyboard | 10 months ago
- Does the website actually do anything related to SXG?
- Would this also work if I search something completely different, goo offline and then just click on the first result?
- What is the point of the code if it's just hardcoded?
- What is the random progressbar doing? Just for visuals?
Edit: I explored a bit more and this blog post[0] by the OP would probably be a better entry-point for this post.
[0]: https://www.pawelpokrywka.com/p/stretching-google-prefetchin...
rapawel|10 months ago
You're right: the site is SXG-enabled, and the point of the demo is to show that Google can prefetch and serve it even when you're offline — but only if you search for a specific phrase on Google. Random searches won’t trigger the right preload.
The 4-digit code is intentionally hardcoded — it's not a security check, but a way to make sure the user follows the instructions and gives Google a bit more time to prefetch the content before going offline.
The progress bar also helps with timing — making sure the preload has a chance to complete.
After reading your comment, I added a link to a blog post in the final step of the instructions, in case the demo doesn't work as expected. (If the page is cached from an earlier visit, a refresh helps — it's got a long browser cache.)
Thanks again for digging into it!
blharr|10 months ago