0

I have created chrome extension which gets all page items and put all on first page. To get other page items, i used iframe. But there is an error: refused to display in a frame because it set 'X-Frame-Options' to 'deny'. How can i access on aliexpress website?. here is my code



  let ifrm = document.createElement("iframe");
        ifrm.setAttribute("src", 'https://www.aliexpress.com/glosearch/api/product?CatId=' + catId + '&SearchText=' + searchText + '&catName=' + catName + 'SortType=default&page=' + nextPage + '&isrefine=y&');
        ifrm.style.width = "640px";
        ifrm.style.height = "480px";
        document.body.appendChild(ifrm);
        console.log(ifrm)


  • You can't when the site has explicitly set deny for that header. It is their right not to allow others to put their site in an iframe – charlietfl Jun 20 '20 at 18:48
  • You can. Simply remove the HTTP response header as shown in the linked topic. – wOxxOm Jun 21 '20 at 03:34

0 Answers0