feat: respect data-swup-no-preload for preloadHoveredLinks/preloadVisibleLinks#138
feat: respect data-swup-no-preload for preloadHoveredLinks/preloadVisibleLinks#138aleclarson wants to merge 1 commit intoswup:mainfrom
Conversation
|
Hi @aleclarson , Thank you for your contribution! Out of interest: what's your use case for not wanting a page to be preloaded, at all? Would you mind also creating a section in the readme for the attribute |
They are server-rendered pages that may often be "passed over" with the mouse, but don't get clicked as often, so I'd prefer to avoid hitting the database for them unless needed.
Yup will do |
|
@aleclarson Looks useful to me! Is there a reason you switched around the order of the checks? If you get around to adding a super short readme section, we'd be happy to merge this. |
Description
Make the
preloadVisibleLinksandpreloadLinksOnAttentionmethods check thedata-swup-no-preloadattribute. If it exists, skip preloading for that link.Checks
mainbranchnpm run lint)npm run test)Additional information