Prefetch links

jampack can prefetch links on the page for faster future navigation.

Read more about why you need link prefetch on web.dev.

Configuration

{
  misc: {
    prefetch_links: 'in-viewport',
  },
}

Possible options

No prefetch of links are added to the pages.

jampack adds quicklink to all the html page.

quicklink prefetches links that appear in viewport during idle time.

quicklink is a ~2K (minified/gzipped) Javascript module. This Javascript is asynchronously loaded by jampack at low priority and doesn’t affect the performance of the pages. The quicklink module is loaded once by the browser and cached for new pages.

See quicklink website for more information.

Demo

SOURCE

JAMPACKED

_jampackquicklink-2.3.0loader.js55quicklink.mjs3549subfoldersubfolderindex.html136index.html270index.html522index.html649styles.css1043styles.css1043

SOURCE

  • subfolder
  • index.html136
  • index.html522
  • styles.css1043

JAMPACKED

  • _jampack
  • quicklink-2.3.0
  • loader.js55
  • quicklink.mjs3549
  • subfolder
  • index.html270
  • index.html649
  • styles.css1043
SourceOpen in new tab
JampackedOpen in new tab
Terminal
__                                    __    
    |__|____    _____ ___________    ____ |  | __
    |  \__  \  /     \\____ \__  \ _/ ___\|  |/ /
    |  |/ __ \|  Y Y  \  |_> > __ \\  \___|    < 
/\__|  (____  /__|_|  /   __(____  /\___  >__|_ \
\______|    \/      \/|  |       \/     \/     \/
 v0.22.1              |__| by â€čdivâ€șRIOTS

Options:
{ onlyoptim: true }

Merging default config with:
{
  "misc": {
    "prefetch_links": "in-viewport"
  }
}

 PASS 1 - Optimizing 
▶ index.html
▶ subfolder/index.html
Done: 33.227ms

 Issues 

▶ index.html

 fix  Adding missing  to the top of the 

▶ subfolder/index.html

 fix  Adding missing  to the top of the 


 2 issue(s) over 2 files