Giter Club home page Giter Club logo

Comments (4)

addyosmani avatar addyosmani commented on July 30, 2024 1

I'm fully supportive of addressing this feature request via Luke's proposal in #31 (origins, filter). Let's tackle solving this through that implementation.

from quicklink.

lukeed avatar lukeed commented on July 30, 2024

This would be solved by a fully configurable origins option, as mentioned in #31 (comment)

Another possibility could be to add a new filter option, since it's no longer just checking origins. This can apply function(s) or RegExp(s) to any URL. It's then prefetched if the function/RegExp passed.

When paired with origins[], the filter(s) would have to run after the hostname check.

from quicklink.

haroldo-ok avatar haroldo-ok commented on July 30, 2024

I agree that adding the possibility of passing a predicate function in order to filter which links should be prefetched would provide lots of flexibility without adding much code to the library.

One detail that I'm thinking, though: some less careful library users may not notice their download links are being prefetched, too... some default filters may come useful for "drop-in" operation.

from quicklink.

addyosmani avatar addyosmani commented on July 30, 2024

Fixed by 1ff3554. origins and ignores will be in the next release so filtering will be available shortly.

from quicklink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.