Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts

    doctypes and, server side includes.

    Hi,

    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.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #2
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Gary

  • #3
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Thanks Graft-Creative.

    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.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #4
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Gary

  • #5
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    yeh that to simple for me to work out!

    I think it makes perfect sense though.

    Bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #6
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Hmm, I am trying to pull the outputted html generated by perl files.

    EDIT

    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.

    Bazz
    Last edited by bazz; 01-24-2005 at 07:41 PM.
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •