[squid-users] Re: How to push prompt to browser?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 07 Feb 2003 17:09:21 +0100

You have two options

a) Send a temporary redirect to another URL with the question

b) Respond with a uncacheable content displaying the question.

And in both cases you have figure out a way how the user can confirm
that he wants the object downloaded..

However you need to know that HTTP knows nothing about "pages". In HTTP
a "page" simply consists of N objects, each requested individually with
no direct relation between the requests, usually starting with the HTML
content, then style sheets, inline images etc.. and the browser also
caches items locally so you may end up with only having a request for a
single inlined image when the user selects to display a certain page, or
none at all.. It is only the browser who has a notion of what a "page"
is by parsing the HTML content.

Lets take a simple page as an example

  http://www.squid-cache.org/

This page consists of the following HTTP objects

  http://www.squid-cache.org/
  http://www.squid-cache.org/Squidlogo2.gif
  http://www.squid-cache.org/Icons/squidnow.gif
  http://www.squid-cache.org/Icons/cache_now.gif

When the browser has all 4 objects the page is fully displayed. If the
browser is missing one or more of these objects it will send individual
HTTP requests for each missing object.

To Squid the request for http://www.squid-cache.org/ is no different
from the request for http://www.squid-cache.org/Squidlogo2.gif or any of
the other inline images. It is just a HTTP request for a specific URL.

You also need to keep in mind that there is also many other applications
than browsers using HTTP. There is such things as antivirus agent
updates, various active applets requesting special information (i.e.
"realtime" stock exchange rates or whatever)... and many more, and you
do not want these to be "disturbed" by your question as there is no
human in the other end who can confirm the question..

fre 2003-02-07 klockan 09.30 skrev Louis Lau:
> I don't know if this would simplify my problem. Does anyone know how to push
> prompt to browser in some occassion? like if they are accessing a site not
> in cache, prompt them and only get that page directly if they want?

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Fri Feb 07 2003 - 09:09:53 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:16 MST