Infinitely nested iframes
ciphrd.com
ciphrd.com
Ahhh, enterprise software development...
I protest with every iframe they add. We have a page that starts with 6 and gets up to 20. It wouldn’t be so bad if they loaded basic html, but they use a WYSIWYG editor which generates tons of SVGs and JavaScript, so it really maims our product.
[0] https://stackoverflow.com/questions/14223628/why-does-a-self...
#!/usr/bin/env python3
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return world("0")
@app.route('/<depth>')
def world(depth):
return f"""
<head><title>iframe loop</title></head>
<body><h1>iframe loop</h1>
<iframe width="800" height="600" src="/{int(depth)+1}"></iframe>
</body></html>
"""
if __name__ == '__main__':
app.run()
I put the Chrome tab out of it's misery after 250 frames, it was really chugging along. const http = require('http');
const url = require('url');
http.createServer((req, res) => {
const queryObject = url.parse(req.url, true).query;
return res.writeHead(200, {
'contentType': 'text/html'
}).end(world(queryObject.depth));
}).listen(8080);
function world(depth = 0) {
return `
<head><title>iframe loop</title></head>
<body><h1>iframe loop ${depth}</h1>
<iframe width="800" height="600" src="/?depth=${parseInt(depth)+1}"></iframe>
</body></html>
`;
}