Thinking more about this, I would really like the content to be parsed into the page as it would with a php include(). I just want to avoid having to work with multiple scripting and hosting setups.
<!--#include file="college.html" -->
^^^this type of include would be fine, but often won't work unless you rename page to shtml. Something like it though?
The <!--#include file="college.html" --> command can only access files that are located on your local system, not on another server.
I think the best solution is to use an iframe.
FYI: Google Adsense uses an iframe to display Adwords.
Wow, you've just mentioned and ruled out every technology I can think of that allows you to update only one file and then import/include it on more than one page.
I think these are your options.
seoer, here's an example of an iframe:
<iframe src="http://www.mydomain.com/insert.html" width="450" height="65" scrolling="no" frameborder="0"></iframe>
I hope tedster will post his solutions too ;-)
actually, a php include() statement will work with remote urls given certain specific security settings on the local machine.
You can get around the extension setup through the use of index.php's where the filename/extension doesn't show, or through the use of .htaccess to set arbitrary extensions to be php executed. For example, on most of my websites .htmls are php executed and .htm are pure html.
|King of Bling|
Suprised you don't want to consider SSI. You could still set the servier to parse .htm or .html files as dynamic...
SSI seems to be the best way to do this, but it doesn't seem possible to include remote (off server) files. Well there seems to be some conflicting information out there at least.
You can handle this with Dreamweaver's .lib files - if you have $500 to blow on a so-so editor....
|I want to have an included file on a few clients sites that doesn't use js |
I doubt that any SE will index JS-generated content though.
I don't want to use JS because SE's (google) wouldn't pick up any of the links created by document.write. They would be visable to a user, but not to a bot. This is the reason why adsense won't get counted as a backlink.
Does anyone know if this can be made to work?
<!--#include virtual="http://www.mypage.com/content.html" -->
Then you'll have to generate content on the server side. Look for remote includes.
I don't know about SSI, but with PHP you can use readfile [php.net], e.g.: <?php readfile("http://example.com/somefile.inc");?>
<added>Are you trying to sell PageRank(tm) [google.com]? Not a very successful business strategy IMHO. ;)</added>