Closed jsanchezs closed 5 years ago
What’s the use case for this?
@dieulot In our dashboard (the main page), we have several menu items. Some of them, makes a lot of request to our database, some of them not.
We want to use this plugin only for some URLs. As we optimice the requests, we will use the plugin on those URLs
Thanks. I don’t think your use case warrants the feature, in your case I’d recommend putting data-no-instant
attributes on links even though this might be tedious.
Note that you might simulate the behavior you want with a bit of JavaScript:
var notInstantLinks = document.querySelectorAll('a:not([data-instant])')
for (var i = 0; i < notInstantLinks.length; i++) {
notInstantLinks[i].dataset.noInstant = ''
}
I’m leaving this open for now as I’d like to hear use cases from other people.
I'd like to add this feature as well.
On my website https://gretathemes.com/wordpress-themes/thefour/, I only want to preload the demo theme page, so users have better experience. Preloading other links is not necessary to me at the moment.
I remember I can do that with InstantClick.
I'd like to add this feature as well.
My website got a list of big boxes with carousel inside links (very easy to hover and click on them) There are buttons on those boxes too and we only want some of those buttons to be preloaded
I don't want to invalidate all the big boxes' cache to disable preloading (and I am fine having no preloading on old big boxes' buttons)
Surely if prefetching is the exception rather than the rule, instant.page is simply not the tool you need…?
Opt-out vs Opt-in I prefer the later one, same as some other people Should a tool not be provided an option for users to opt-in as they want?
If you have more questions/opinion about #29 please put a comment there
Shipped in 1.3: https://instant.page/blacklist#whitelist
I would like to deactivate for every href and only activate for those with the
data-instant
attribute.Does it make sense?