question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Link Prefetching

See original GitHub issue

Hey there,

I was thinking about how to speed up navigation and remembered the case where some flickr pictures were getting deleted because some browsers where prefetching links. But, flickr had implemented DELETE as GET… ¬_¬ lovely!

Anyway, these days HTML supports adding prefetch (and the likes) hints to the browser so it speeds up certain aspects of the navigation.

As part of that, there’s also lazy loading images (which could be its own separate GH issue)… A quick search in this repository gave me a couple of hints that the library we’re using to render images already support it (?).

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gliechtensteincommented, Nov 23, 2016

Aha, that makes sense! Yeah I think this is something we could potentially support in the future. Let’s sit on it for a while 😃

p.s. If anyone comes across this and has some ideas on why this will be useful for them, feel free to comment.

0reactions
gtramontinacommented, Nov 24, 2016

But what if we have 500 items on the screen, each with different link?

This is why it would come labeled as use judiciously… 😄 This shouldn’t be enabled by default.

Here’s a sketch of what I have in mind…

{
  "type": "label",
  "text": "Push me",
  "href": {
    "url": "https://www.jasonclient.org/next.json",
    "prefetch": "true"
  }
}

There’s a lot more to prefetching, but the immediate benefit I see here is to provide a smoother transition between screens, and the example above tries to reflect that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link prefetching FAQ - HTTP - MDN Web Docs
Yes, only http:// and https:// URLs can be prefetched. Other protocols (such as FTP) do not provide rich enough support for client side...
Read more >
Resource Hints: prefetch | Can I use... Support ... - CanIUse
Informs the browsers that a given resource should be prefetched so it can be loaded more quickly. This is indicated using <link rel="prefetch"...
Read more >
Link prefetching - Wikipedia
Link prefetching allows web browsers to pre-load resources. This speeds up both the loading and rendering of web pages. Prefetching was first introduced...
Read more >
Prefetch resources to speed up future navigations - web.dev
This guide explains how to achieve that with <link rel=prefetch> , a resource hint that enables you to implement prefetching in an easy...
Read more >
What Is Prefetching and Why Use It - KeyCDN Support
Link prefetching, as discussed in the previous section, is a mechanism that allows the browser to fetch resources for content that is assumed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found