title: javascript: Loading the same url in different iframes, how to use only one http request?
body: <p>If I have different <code>iframes</code> on a page and want to load the same <code>url</code> in each one of them, if I simply use the same <code>url</code> I can see in Developer Tools that there're as many http requests as iframes</p>
  
  <p>How could I prevent this to happen, and to do only one request and that this populates all iframes?</p>
  
  <p>Should I load one iframe and then clone it? This first attempt is not working</p>
  
  <p>(React)</p>
  
  <pre class="lang-js prettyprint-override"><code>  const [url, setUrl] = useState()
  
    useEffect(() =&gt; {
      const request = new Request('anyurl')
      setUrl(request.url)
    }, [])
  
    return (
      {Object.entries(iframeArray).map(() =&gt; (
          &lt;Iframe sandbox="" src={url} /&gt;
        ))}
    )
  </code></pre>