I am developing client side of web application. In this application, there are tons of tabs, divisions, and other html elements. I would like to separate those elements as classified file like tab1_elements.html, tab2_elements.html and want to include those to main page.
sample code
<html>
<body>
<div id="upper_area">
<iframe src="./right_content.html"></iframe>
<iframe src="./ceneter_content.html"></iframe>
<iframe src="./left_content.html"></iframe>
</div>
<div id="main_area">
<iframe src="./main_content.html"></iframe>
...
...
</div>
...
...
I googled a bit and noticed that html5 import attribute is just what I am looking for. However, I believe that attribute still not available yet for most browsers.
And I know it will take time to brwosers adapt that attribute. (maybe not adapt at all in worst case). So I am considering including iframe to main page. From what I heard, iframe was almost deprecated by w3c for security reasons and other issues. I wonder what are cons of iframe element and why developers tend to avoid this tag.
Is using iframe a bad idea?
I already tried ajax way to load external html files but chrome browser does not allow ajax communication for local files (application should run ok in off line mode). Can you guys suggest any alternative solutions?
Thank you for reading my post.