[m.p.d.g],[c.o.l.a] Suppress images at server rather than browser?

S

sinbuzz

People,

Most browsers allow me to suppress viewing of images when I browse a
URL.

Can this behavior be duplicated by the server?

I'd like for my server to detect if a user has image viewing turned off
in his browser.

Then, my server would be loaded a bit less.

-Bob

(e-mail address removed)
http://SinBuzz.com
[ For Those Who Live In Sin ]
 
S

spike1

(e-mail address removed) did eloquently scribble:
Most browsers allow me to suppress viewing of images when I browse a
URL.
Can this behavior be duplicated by the server?
I'd like for my server to detect if a user has image viewing turned off
in his browser.
Then, my server would be loaded a bit less.

Um... when images are disabled in the browser, it doesn't send the REQUESTS
for the images TO the server in the first place. So I don't see how the
server detecting this would reduce load. If anything the extra check would
add cpuload to the server.
--
______________________________________________________________________________
| (e-mail address removed) | "Are you pondering what I'm pondering Pinky?" |
|Andrew Halliwell BSc(hons)| |
| in | "I think so brain, but this time, you control |
| Computer Science | the Encounter suit, and I'll do the voice..." |
------------------------------------------------------------------------------
 
M

mlw

(e-mail address removed) did eloquently scribble:





Um... when images are disabled in the browser, it doesn't send the
REQUESTS for the images TO the server in the first place. So I don't see
how the server detecting this would reduce load. If anything the extra
check would add cpuload to the server.

It is probably useless as a way to reduce load, but it is an interesting
problem for which the solution may be useful.

Then again, perhaps not, most of the web is unusable without pictures these
days.
 
S

sinbuzz

Yes,
You have an obvious point.
What about if we have only 1 response to 1 request?

So...
Let's do a mind experiment.

1. I type http://ibm.com into my browser and hit enter
2. browser sends 1 request to ibm.com
3. server sends a bunch of data back in 1 response

I'm trying to get a better understanding of step 3.
Can the server get any info out of the request which it can use?

Is there something in the request header which says,
"dont send images"
??

....Bob
(e-mail address removed)
http://SinBuzz.com
[ For Those Who Live In Sin ]
 
M

mlw

Yes,
You have an obvious point.
What about if we have only 1 response to 1 request?

So...
Let's do a mind experiment.

1. I type http://ibm.com into my browser and hit enter
2. browser sends 1 request to ibm.com
3. server sends a bunch of data back in 1 response

I'm trying to get a better understanding of step 3.
Can the server get any info out of the request which it can use?

Is there something in the request header which says,
"dont send images"
??

You should SERIOUSLY learn how to read HTML and look up the RFC on HTTP.

Sigh...

Typically when you issue an HTTP request, an HTML document (or some other
format) is returned. If it is something the browser or add-on program
understands, the file is parsed and additional action is taken.

In the case of HTML and the <A IMG...></A> tag, an additional HTTP request
is made for the image.
 
T

Tim Smith

Let's do a mind experiment.

1. I type http://ibm.com into my browser and hit enter
2. browser sends 1 request to ibm.com
3. server sends a bunch of data back in 1 response

4. Browser parses the data, which consists of a header and a body. The
body is likely HTML. In that HTML, the browser finds the img tags.

5. If you haven't disabled images, for each img tag:

5A. The browser sends a request to get the image.

5B. The server sends back the image.

A simple page with 5 images on it would involve 6 requests to the
server, and 6 responses from the server.
 
R

Roy Schestowitz

__/ [ (e-mail address removed) ] on Friday 19 January 2007 00:15 \__
People,

Most browsers allow me to suppress viewing of images when I browse a
URL.

Can this behavior be duplicated by the server?

I'd like for my server to detect if a user has image viewing turned off
in his browser.

Then, my server would be loaded a bit less.

-Bob

Hi,

File managers like Konqueror tends to send simultaneous requests for images
and other files in order to create thumbnails and previews (e.g. for
directory contents). I rely one host which supresses this partially by
setting a limit on the number of simultaneous connections (to 5). While it
makes it annoying to browse (getting warnings), it can sooner or later force
to user to stop fetching image previews over, e.g. FTP (this can be done on
a per protocol basis) or set on a limit on this multithreaded process. I
don't know why you crossposted to these two groups, but FWIW the server in
question runs BSD.

--
~~ Best wishes

Roy S. Schestowitz | $> apt-get -not windows
http://Schestowitz.com | GNU/Linux | PGP-Key: 0x74572E8E
Swap: 1036184k total, 398188k used, 637996k free, 177668k cached
http://iuron.com - next generation of search paradigms
 
S

spike1

(e-mail address removed) did eloquently scribble:
Yes,
You have an obvious point.
What about if we have only 1 response to 1 request?
So...
Let's do a mind experiment.
1. I type http://ibm.com into my browser and hit enter
2. browser sends 1 request to ibm.com
3. server sends a bunch of data back in 1 response

The server sends back the index.html page for that 1 request.
The browser begins rendering the page, selecting fonts, setting up tables
and frames, looking up image sizes, downloading the images on the page (or
not, if images are disabled)
I'm trying to get a better understanding of step 3.
Can the server get any info out of the request which it can use?

The html page IS the real "set of requests". HTML is simple text, it
contains no graphical data within itself. Only <img> links within it. It's
those said:
Is there something in the request header which says,
"dont send images"

No, it doesn't request the image. Servers only send what is requested.
try it with wget. Just point wget at your favourite website, say...
wget slashdot.org
If you just wget an index.html page (or just point it at a website), that is
all you'll get. It won't parse the index.html page and download everything
referred to on it unless you tell it to.
--
| |What to do if you find yourself stuck in a crack|
| (e-mail address removed) |in the ground beneath a giant boulder, which you|
| |can't move, with no hope of rescue. |
|Andrew Halliwell BSc(hons)|Consider how lucky you are that life has been |
| in |good to you so far... |
| Computer Science | -The BOOK, Hitch-hiker's guide to the galaxy.|
 
S

spike1

4. Browser parses the data, which consists of a header and a body. The
body is likely HTML. In that HTML, the browser finds the img tags.

I.... wonder if we've been duped and just done someone's homework....
:)
--
______________________________________________________________________________
| (e-mail address removed) | |
|Andrew Halliwell BSc(hons)| "ARSE! GERLS!! DRINK! DRINK! DRINK!!!" |
| in | "THAT WOULD BE AN ECUMENICAL MATTER!...FECK!!!! |
| Computer Science | - Father Jack in "Father Ted" |
------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top