Turns out only certain file types are checked for included files by the server.īTW, I noted the following cryptic answer, but only understood it after I learned about the SSI from other sources. I always assumed that it was always automatically done that way and that you didn't need to specify it. I guess it makes sense that the server needs to look inside the. This is called SSI (Server Side Includes). html file that you want to be included in your main file. It is still an html file, but now the server will look inside for other files that you can include this way. I just learned a very simple way to include html files inside of other html files that is much better. I realize this question was answered years ago, but I think it was not the best answer. Here's few notes taken from the above link:įirefox has no plans to support HTML imports though for now it can be enabled through the "" preference in about:config The use of HTML5 Imports is highly discouraged as you can see on here. There are variety of options available to do it from back-end depending on your tech.Īnother possibility as Pete highlighted is the use of iframes (although I would prefer not to use them). Other than that you will need Javascript at bare minimum to import another file if you want to do it from client-side. It does have very limited support/browsers implementing it. The object tag is part of HTML 4 therefore it's supported since IE6+, Firefox 2+, Chrome 1+ etc. It works on similar basis as HTML5 Import. This seems like a more suitable option compared to the rest of options below. You can include another file (of any kind) onto your page. An option worthwhile exploring is the object tag.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |