Re: [squid-users] advisory message before browsing

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 2 Nov 2004 15:25:13 +0100 (CET)

On Tue, 2 Nov 2004, Rolf wrote:

> I can get that a redirector would be handy - squid sends the requested url to
> the redirector (any url or only unapproved ones for eg) which is then
> rewritten to the advisory page. This would display the advice page in the
> same browser window. But then how does one construct the mechanism to
> continue to the requested url?

This is possible by

a) Have the redirector and your "policy page" share a common database on
"users who have accepted the policy".

b) Have the redirector send the original URL as a query argument to your
policy page, allowing the policy page to redirect back to the original URL
when the policy is accepted and this user has been added to the "policy
accepted database".

> Seems that the url for the advice page could be comprised of javascript to
> cause a new window to appear - is it as simple as once such a window is
> dismissed the requested url would get loaded?

Trivial JavaScript coding...

    opener.location = the_original_url;
    window.close();

assuming you have already figured out how to get the original URL.

How you present this thing or get back to the original URL after the
redirection is all about HTML/JavaScript, nothing really relevant to the
proxy.

> Further how is this accomplished so that the warning advice only appears upon
> first using the browser (time limited or what)?

If you do this in the proxy time is about the only variable you have.

There is other approaches solving this outside of the proxy. It is also
possible solving it at the client by using a clever proxy-pac script
(assuming you have control over the clients).

Regards
Henrik
Received on Tue Nov 02 2004 - 07:25:27 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST