Dear Merlyn,
Thanks for replying. I now have a solution to this question (well more correctly, I've understood why my question was a dud) which I will post in a sec.
Regarding, the setting of a cookie, I puzzled over your paragraph for a few minutes, trying to understand what you were saying. In the end I decided that we were both saying the same thing but neither of us said it very well, me in particular. I don't understand why you bring MIME into this but that is probably my ignorance. But I wanted to fix what I said so that I don't mislead monks searching on this subject in the future.
I think that you cannot set a cookie with an SSI script because the set-cookie command goes into the CGI header before the html starts. Since that's the only place the server looks for the set-cookie command, it is not going to find it in the output of the SSI which is embedded into the HTML.