GithubHelp home page GithubHelp logo

Comments (1)

hirasso avatar hirasso commented on August 31, 2024

We decided that starting preloads on touchstart is an easy gain. Implemented in #53 .

Updated planned logic on desktop:

Anytime a link is hovered:

  1. If there is already a preload running that was initialized by a hovered link, abort it
  2. Start a new preload for the currently hovered link
  3. Don't abort preload requests that where initialized directly (initial page preload or preloads initialized by preloadPages)

This will make sure that the link a visitor actually wants to visit won't be blocked by a previously hover-initialized and not yet finished preload.

Planned API:

// will be aborted by a subsequent preloadPage request
preloadPage(url, { priority: 'low' });
// won't be aborted:
preloadPage(url, { priority: 'high' });

A lot of this was already implemented in #46, but we decided to wait with this until swup@3 is released. That way we won't have to re-implement the abort logic once we have made the switch to the fetch API, as proposed by in swup/swup#566

from preload-plugin.

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.