I am commenting own my on posting.
I have been experimenting, and one option I was able to come up with was to either do an SSI include to a script if I do not need to write to the http-headers.
If I do need to set something in the http-headers, I can load the script in place of one of the page images, do the processing I need to do, and then serve the image.
This only works if I do not need to have the page perform some function where it is not redirecting to itself in different phases of the script. That would only break the image. The solution I came up with was to substitute the default image with one intended to trick the user into voluntarily clicking a direct link to the full script by making the image which loads say something like "Click here to activate feature X". The script now has the opportunity to perform the needed functions with none of the limitations of being called as a part of a static page. Then when the task is done, the script redirects to the static page the user came from and sends a confirmation to tell the user it was a success. The confirmation is done as a SSI include.
The script only serves the "Activate" image once. As soon as the needed function has been performed, it goes to the default image.
A bunch of work, but it lets me keep the static page model. This way, running scripts is kept to the minimums of necessity hopefully to the benefit of the server's workload.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.