TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Accessing a website you never visited before while being offline [demo]

25 点作者 rapawel大约 1 个月前
This interactive demo explores how a website can load and function while you&#x27;re in airplane mode — even if you&#x27;ve never visited it before. It requires official Google Chrome and does not work on iOS devices (iPhone&#x2F;iPad).<p>Spoiler alert: For the best experience, try the demo before reading the explanation below. You can launch it by clicking the post title at the top of this page.<p>The demo uses SXG (Signed Exchanges), a web standard that allows Google to prefetch entire pages from search results. This means that when you click a result, the page can open even if you&#x27;re offline — because it was silently prefetched beforehand. In this demo, I push SXG to its limits by delivering a page with a 19 MB video — all before you go offline.

8 条评论

ranger_danger大约 1 个月前
Not mentioning prefetch in the title is extremely clickbaity IMO.<p>You could also argue that prefetching IS visiting a site (the data was still downloaded, it counts as a visit on their end for sure), you just haven&#x27;t actually viewed the content yet.
评论 #43633766 未加载
评论 #43633767 未加载
rapawel28 天前
I published the repository with source code of the demo. The README contains detailed explanation how the demo works as well as instructions on how to host the demo yourself.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;pepawel&#x2F;stretching-prefetching">https:&#x2F;&#x2F;github.com&#x2F;pepawel&#x2F;stretching-prefetching</a>
poutrathor大约 1 个月前
Here is my feedback.<p>Steps are not clear enough. It looks to me it&#x27;s a step by step guide but it missed at least 2 points :<p>- the search engine must be Google I think ? Mine is duckduckgo and it doesnot work<p>- I still dont know if my device is supposed to be in airplane mode or no for the test. In airplane mode, even with Google set as the search engine, it does not work. Pixel phone. If I am connected to internet, I do have the single result from the google search.<p>I guess we are expected to be pleasantly surprised by something, but since I don&#x27;t know what to look for and it does not work, it&#x27;s a miss for me.<p>Personally I prefer to have the explanation alongside the steps that way I know what I am doing and can correctly interpret the instructions. For me, learning the technical trick does not diminish my contentness.
评论 #43634134 未加载
das_keyboard大约 1 个月前
I don&#x27;t really get it, but I&#x27;m also not using chrome, but looking at the website&#x27;s source instead.<p>- Does the website actually do anything related to SXG?<p>- Would this also work if I search something completely different, goo offline and then just click on the first result?<p>- What is the point of the code if it&#x27;s just hardcoded?<p>- What is the random progressbar doing? Just for visuals?<p>Edit: I explored a bit more and this blog post[0] by the OP would probably be a better entry-point for this post.<p>[0]: <a href="https:&#x2F;&#x2F;www.pawelpokrywka.com&#x2F;p&#x2F;stretching-google-prefetching" rel="nofollow">https:&#x2F;&#x2F;www.pawelpokrywka.com&#x2F;p&#x2F;stretching-google-prefetchin...</a>
评论 #43634476 未加载
评论 #43639381 未加载
hiatus大约 1 个月前
This is pretty cool! Is there code for this somewhere? Would be cool to implement a client for hackernews that uses this for when I&#x27;m on the train.<p>Found some more tests here too that seem interesting: <a href="https:&#x2F;&#x2F;www.planujemywesele.pl&#x2F;sxg-tests&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.planujemywesele.pl&#x2F;sxg-tests&#x2F;</a>
评论 #43633726 未加载
RDS_220B大约 1 个月前
Your demonstration of using SXG to prefetch a 19 MB video for offline viewing is impressive. This is very innovative. It enhances user experience by enabling seamless content access without an active internet connection and showcases the potential of SXG in improving web performance. Thank you for your creative approach!
andrethegiant大约 1 个月前
Would be interested in seeing a public repo if you want to make that available! :-)
评论 #43636428 未加载
krisandrz大约 1 个月前
indeed it feels like magic :)