I have been using, this plugin and its says
I’ve added a filter To restore the old behavior (hint everything) on WordPress 4.6 and above. To use it, add this line to your theme’s functions.php file or a custom plugin:
I have looked at the code and it seems extremely hacky and horrible to me (not the way it is done, the way it seems it had to be done at that point)
I actually am using the filter to hint everything right now (probably bad idea). I once stumbled on a thread on wp core track about this but I can not find it. From the introduction posts code I am really not learning that much.
What I would like is just something like
wp_register_script( ..., $http_prefech = true );
I think that was also discussed on trac somewhere.
Can there be a wrapper like this or can you show me in the most simple, more native to WP way how I set a specific asset to prefetch?