Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If we stored the edges (links) and nodes (pages) separately, rather than requiring you to blindly run a node's code just to discover what its edges might be, then you could skip the prediction and instead pre-cache the next hop for all edges just in case you follow one. You could even do this to two or three hops.

Welcome to Next.js



Can next.js give me a page's links without requiring that I execute any code that I didn't have prior to visiting that page?

The .js part makes me think not.


Speculative Rules API

  <script type="speculationrules">
  {
    "prefetch": [
      {
        "source": "list",
        "urls": ["/checkout.html", "/thank-you.html"]
      }
    ] 
  }
  </script>


Right, but my browser doesn't interpret that. The site tells me to run some code which interprets it.

I should be able to get the lay of the land without trusting the site enough to blindly execute whatever code it points me at. It's needless attack surface.

Also it's not really pointing me at data, its pointing me a certain kinds of requests which I have to trust will be responded to consistently. I'd much rather have a hash so if I have that data lying around I can just forgo the request entirely and use what's present locally.


That is a browser API, there is no other code or script needed.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: