• [ Moderator note: moved to How-to and Troubleshooting. ]

    Hi everyone,
    Different screens require different image resolution.
    Theoretically we can querry the device or window resolution and provide an image that perfectly matches that resolution – isn’t it so?
    There are a few questions that arise:
    1. Is there a plugin that can do this automatically?
    2. If we query the screen resolution – does it mean a two way data trip between the user and server is needed, or can the user provide info about screen resolution when it sends the request?
    Thanks in advance,
    Ben

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    I can’t speak about available plugins, it’s possible, but I’m not aware of any. The JavaScript needed to determine display parameters is not that complicated.

    It does end up being a 3-way trip in the end though. The client (browser) will not volunteer such information on an initial request, you would need to load some JavaScript on the page with the initial response. That’s trip 1. The script can determine the parameters and make a new request that does include the needed data. Trip 2. With that data, the server can appropriately format the response to perfectly fit the screen. Trip 3.

    Not the best scenario for quick loading on mobile devices. Each trip takes a fair bit of time. A responsive layout is preferable. It works well for fitting the width. It’s not so good at fitting vertically.

    Thread Starter bencm

    (@bencm)

    Excellent answer. Not sure what is the problem with the vertical fitting you are referring to.

    Moderator bcworkz

    (@bcworkz)

    If you don’t mind scrolling vertically to see responsive content, then there’s no problem. It’s only a problem if you want content to fit perfectly in all directions with no scrolling at all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image Querry – Implicatios and better understanding’ is closed to new replies.