Comments (1)
We decided that starting preloads on touchstart
is an easy gain. Implemented in #53 .
Updated planned logic on desktop:
Anytime a link is hovered:
- If there is already a preload running that was initialized by a hovered link, abort it
- Start a new preload for the currently hovered link
- 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)
- `options.preloadVisibleLinks.enabled` not being applied automatically HOT 1
- Links with identical `href` will remove urls from `preloadVisibleLinks` queue even if these should actually be preloaded. HOT 1
- Preload stylesheets
- `options.preloadHoveredLinks` incorrectly set up HOT 4
- [Bug]: External links are not being properly ignored on hover HOT 5
- Detect network idle time for preloading? HOT 8
- [Question] How to activate hover only preload HOT 2
- Prepare for new `shouldIgnoreVisit()` in swup@3
- `mouseover` is triggered multiple times on links with complex (nested) markup HOT 9
- Allow marking parent container to preload all children HOT 1
- Remove duplicated logic for handling fetch response HOT 1
- 'pagePreloaded' event doesn't pass any arguments HOT 2
- Priority queue
- Feature: preload links in viewport
- Feature: preload links on focus
- Possibility to ignore a certain link? HOT 1
- dist/index.module.js is missing HOT 2
- Bundling error with webpack
- requestIdleCallback not available in Safari HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preload-plugin.