quicklink
quicklink copied to clipboard
How to solve the CORS of prefetcher
I want to grab the hyperlink image and video link of the current page. my configuration is as follows: ` window.addEventListener('load', () => { let imgSrcs = []; let imgs = document.getElementsByTagName('img'); for (let i = 0; i < imgs.length; i++) { imgSrcs.push(imgs[i].src) }; let videoSrcs = []; let videos = document.getElementsByTagName('video'); for (let i = 0; i < videos.length; i++) { videoSrcs.push(videos[i].src) }; let aLinks = []; let links = document.getElementsByTagName('a'); for (let i = 0; i < links.length; i++) { aLinks.push(links[i].href) }; let urlss = imgSrcs.concat(videoSrcs, aLinks); quicklink.prefetch(urlss,true); });
the hyperlink including some other domains i have enables CORS on Server i have used this method by this link https://enable-cors.org/server_nginx.html But still failed. so
quicklink.prefetch()` can provide the CORS option ?