Re: [squid-users] injecting small piece of html into pages retrieved

From: Andreas Pettersson <andpet@dont-contact.us>
Date: Sat, 22 Mar 2008 06:46:35 +0100

On fre, 2008-03-21 at 19:45 -0700, Edward Rosinzonsky wrote:
> Hi,
>
> I'd like to inject a small piece of HTML into any page retrieved
> through the proxy. E.g. change "</head>" to "<script ...></head>".
> The HTML is static. That is the same piece of HTML is to be injected
> into every page. Is this possible? If so, how? Is there perhaps a
> plugin, that could make this possible?

1. Create an url rewriter to http://localhost/specialscript.pl for the
page in question

2. Have the script fetch the original page

3. Insert desired text using regexp and send to browser

-- 
Andreas
Received on Fri Mar 21 2008 - 23:46:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Apr 01 2008 - 13:00:05 MDT