/    Sign up×
Community /Pin to ProfileBookmark

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?

to post a comment
Full-stack Developer

13 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoFeb 27.2004 — does it have to be in perl. If you have regular ssi enabled you can just use that.
Copy linkTweet thisAlerts:
@SamauthorFeb 27.2004 — 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...
Copy linkTweet thisAlerts:
@PeOfEoFeb 27.2004 — 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.
Copy linkTweet thisAlerts:
@SamauthorFeb 27.2004 — good point. i can do that. did you read my edit?
Copy linkTweet thisAlerts:
@PeOfEoFeb 27.2004 — 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.
Copy linkTweet thisAlerts:
@SamauthorFeb 27.2004 — 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
Copy linkTweet thisAlerts:
@PeOfEoFeb 28.2004 — 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.
Copy linkTweet thisAlerts:
@SamauthorFeb 28.2004 — oh, no, I wasn't wondering if it would increase them, I was wondering if it would decrease them
Copy linkTweet thisAlerts:
@PeOfEoFeb 28.2004 — [i]Originally posted by samij586 [/i]

[B]oh, no, I wasn't wondering if it would increase them, I was wondering if it would decrease them [/B][/QUOTE]
I told you it would not decrease, I made a typo and said increase though. Woops.
Copy linkTweet thisAlerts:
@SamauthorFeb 28.2004 — so their not as much of a bandwidth saver as a programming time saver, good to know.
Copy linkTweet thisAlerts:
@PeOfEoFeb 28.2004 — [i]Originally posted by samij586 [/i]

[B]so their not as much of a bandwidth saver as a programming time saver, good to know. [/B][/QUOTE]
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.
Copy linkTweet thisAlerts:
@SamauthorFeb 28.2004 — 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
Copy linkTweet thisAlerts:
@PeOfEoFeb 28.2004 — [i]Originally posted by samij586 [/i]

[B]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 [/B]
[/QUOTE]
but the include line is removed by the server when the content is parsed in ?
×

Success!

Help @Sam spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...