Problems with Iframe loading files from assets

I have a page (html together with js, css) that I tried loading into html.Iframe() element. I put those files into the assets directory. Dash started to recursively loading itself into the iframe, i.e. ,the iframe itself contains the page, which contains the iframe, inifinitely. I can’t figure out why it does that. If I run a separate server locally and serve up those files, there are no problems. I can’t find the code for Iframe component in Dash’s github repo. Has anyone had this problem before?

Hello @Joechan,

This is recursively loading because I am assuming you are trying to load a dash page into the iframe, this causes it to reload the dash app each time.

I ran into this with trying to repeat how Flask operated, but Dash pages allows for you to have an overall app layout and then the pages get loaded into a container.

I figured out the problem. Dash is doing something to the routes for serving stuff out of the assets directory. For some reason it’ll always loads the dash page, instead of just doing the plain old file serving. The way around this problem is to create a new Flask blueprint to set up a new route for static serving, out of another directory. Then it works.