I am planning the build of some shtml flkes where the includes, will be the outputted html from a few perl files.
Can anyone tell me whether I need to put a doctype on each perl output as well as the shtml page or, is the browser/server 'intelligent' enough to apply the doctype to all the files included in the shtml page. I would like the source code of the shtml page not to show what the includes are or even that there are any.
01-22-2005, 08:54 PM
Bazz, I'd imagine it's like using any other kind of SS tech to deliver includes - the browser only sees what the server sends it, so if you put a doctype in each of your includes you would end up having the doctype repeated multiple times throughout your html page.
The browser will take it's cue from the first include it recieves, and if your doctype is in their then you needn't repeat it in subsequent includes.
I presume then that with the doctype in the shtml page, it'll be unnecessary to put it in the includes. I'll try it like that anyway and post back with the result.
01-22-2005, 09:26 PM
No worries, just started palying about with includes myself, & finding it darn useful.
A good rule of thumb I've been advised to use, is to have your doctype, opening html, head, title, meta data, stylesheet/js links, through to (and including) the opening body tag, contained in the first include.
Then have your closing body & html tags in your last include.
If you do it like this, then all the stuff inbetween is just straight forward html - but without all the usual tags you use to start and end an html doc.
Hope that makes sense.
yeh that to simple for me to work out! :rolleyes:
I think it makes perfect sense though.
Hmm, I am trying to pull the outputted html generated by perl files.
loooong day, made a boo-boo. Can't pull the perl files because of how they are written - ie DB (Flat file), in separate folder from the script. will have to write another perl script me thinks. :eek: