I would like to create an on the page, but then add the src later. If I make an iframe without an src attribute, then it lo
Re your comment clarifying that you're planning to use the iframe as the target for a form submission:
I would use an empty document on the server that sends back a 204 no content.
It avoids
javascript: protocol It's also valid HTML.
So what if it generates an extra request? Set the caching headers right, and there will be only one request for each client.