Click to See Complete Forum and Search --> : Server Side Includes
I was playing around with ssi's today, and found that when I tried to include a perl script it wouldn't work, any suggestions?
Edit: also, when an ssi is executed, is the file included cached?
PeOfEo
02-27-2004, 05:28 PM
does it have to be in perl. If you have regular ssi enabled you can just use that.
no, I have regular ssi enabled, but when i try to execute a perl script within an shtml, it just imports it as plain text...
PeOfEo
02-27-2004, 05:31 PM
I do not think you can include an external script. I do not know perl, but I know in asp classic and asp.net you cant do it with a server side include. But when I need an external script I find myself using a) a code behind or b) an external class. I do not know what perl lets you do as far as calling an external script.
good point. i can do that. did you read my edit?
PeOfEo
02-27-2004, 05:34 PM
when you do an include the server parses the contents of the file you include into the file it is being included on. So thereofre yes, if it is in your html output it will be cached. But hypathetically speaking if you could get the server to execute it, then no.
I was just wondering as far as load times, will using an ssi to include nav's and such will increase load speeds on individual pages as opposed to having the content placed on each page
PeOfEo
02-27-2004, 07:19 PM
why would it increase load times? An include does not call an external file at the browser, but at the server. So though you do not physically put the nav code on every page it is very much there so the user has to load it each time.
oh, no, I wasn't wondering if it would increase them, I was wondering if it would decrease them
PeOfEo
02-27-2004, 07:26 PM
Originally posted by samij586
oh, no, I wasn't wondering if it would increase them, I was wondering if it would decrease them I told you it would not decrease, I made a typo and said increase though. Woops.
so their not as much of a bandwidth saver as a programming time saver, good to know.
PeOfEo
02-27-2004, 07:31 PM
Originally posted by samij586
so their not as much of a bandwidth saver as a programming time saver, good to know. If you want to save bandwidth using css for your layout could be the solution. That way you can still have includes, but you will not be includeing a bunch of tables. The css only needs to be downloaded 1 time by the user if you import it on your pages.
Oh, I know that, I was just initialy wondering if using an ssl would increase or decrease bw usage. And know that I think of it, it would increase very very slightly, since you're adding another 20bytes for the include line.
But anyway, this thread is kinda exausted, thanks for all the help PeO
PeOfEo
02-27-2004, 08:17 PM
Originally posted by samij586
Oh, I know that, I was just initialy wondering if using an ssl would increase or decrease bw usage. And know that I think of it, it would increase very very slightly, since you're adding another 20bytes for the include line.
But anyway, this thread is kinda exausted, thanks for all the help PeO but the include line is removed by the server when the content is parsed in :D