Mobile app version of vmapp.org
Login or Join
Mendez628

: Problem loading a local file in html using the "iframe" tag I am trying to load a local html file within an iframe but nothing happens. I hear this is a security feature of my OS (windows

@Mendez628

Posted in: #Css #Html #Iframe

I am trying to load a local html file within an iframe but nothing happens. I hear this is a security feature of my OS (windows 8). I am designing a website that is not domain registered yet and need to load this local html file within my iframe as it contains my menu bar which i do not want to copy and past to all 8 (currently unhosted) webpages, as this would make further customization tedious.

Does anyone know the correct syntax to load a local file (one that is actually stored on the same computer) and/or the security settings I may have to change?

<iframe scr="file:///C:/Users/davey666/Desktop/Dion/menu.html"> </iframe>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Mendez628

1 Comments

Sorted by latest first Latest Oldest Best

 

@Hamm4606531

It's a security feature of Chrome.

Preferred solution: use relative paths, just as you do with <a> tags.

Temporary pseudo-solution: run Chrome with --allow-file-access-from-files switch. It will make it work, but that's not a real solution, because the real cause of the problem is you using absolute local paths.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme