Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29469

Re: determining screen resolution over the web

From Knute Johnson <eternal@knutejohnson.com>
Newsgroups comp.lang.java.programmer
Subject Re: determining screen resolution over the web
Date 2014-07-31 16:40 -0700
Organization A noiseless patient Spider
Message-ID <lrek5g$atg$1@dont-email.me> (permalink)
References <btglt914p7l0d1ertsa8d5326hji5g90vv@4ax.com> <lrehts$u15$1@dont-email.me> <7fjlt9d0e20gdsn3feh9vlu5jq9035qofu@4ax.com>

Show all headers | View raw


On 7/31/2014 16:15, Roedy Green wrote:
> On Thu, 31 Jul 2014 16:02:24 -0700, Knute Johnson
> <eternal@knutejohnson.com> wrote, quoted or indirectly quoted someone
> who said :
>
>> Do all your CSS in percentages rather than pixels or ems.
>
> Still to do it properly you have to send different content, not just
> format it differently.
>
> You need smaller chunks with more requests for more.
>
> I am writing an essay on the problem at
> http://mindprod.com/jgloss/multiscreen.html
>

I thought you were asking how to size things for a device that could 
have significantly different screen resolutions.  If you want to 
determine the browser you can use the HTTP_USER_AGENT environment 
variable and select your response accordingly.  Or as you showed above 
you can let the browser decide which type of device and restrict the 
HTML that is sent back that way.

In CSS:

@media print {
     .noprint {
         display: none;
     }
}

and then set the stuff you don't want printed with the class "noprint".

-- 

Knute Johnson

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

determining screen resolution over the web Roedy Green <see_website@mindprod.com.invalid> - 2014-07-31 15:33 -0700
  Re: determining screen resolution over the web Knute Johnson <eternal@knutejohnson.com> - 2014-07-31 16:02 -0700
    Re: determining screen resolution over the web Roedy Green <see_website@mindprod.com.invalid> - 2014-07-31 16:15 -0700
      Re: determining screen resolution over the web Knute Johnson <eternal@knutejohnson.com> - 2014-07-31 16:40 -0700
        Re: determining screen resolution over the web Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2014-08-01 09:41 -0500
          Re: determining screen resolution over the web Knute Johnson <eternal@knutejohnson.com> - 2014-08-01 08:12 -0700
        Re: determining screen resolution over the web Gene Wirchenko <genew@telus.net> - 2014-08-01 11:01 -0700
        Re: determining screen resolution over the web Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-01 16:07 -0400
  Re: determining screen resolution over the web Arne VajhĂžj <arne@vajhoej.dk> - 2014-07-31 22:22 -0400
  Re: determining screen resolution over the web Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2014-08-04 15:20 +0300

csiph-web