4

Is there a way for knowing what size was the visible portion of a page?

Are there any services that provide this? I mean, not just screen resolution, but available browser area. When a user has a lot of browser toolbars the area left for the webpage gets reduced. On the other hand, using Chrome may maximize the available space.

Thanks

3 Answers 3

2

Using Javascript, you can get the Window.InnerHeight & .InnerWidth

1
  • 1
    This is often called the "viewport".
    – DOK
    Commented Jun 4, 2010 at 16:58
1

You'll have to use Javascript or JQuery to do so.

Here is a similar (answered) question

1

I found another implementation on StackOverflow itself which used jQuery.

$(window.top).width()  
$(window.top).height()

P.S. Just don't forget the brackets as i always missed them.

Reference: https://stackoverflow.com/a/7008807

1
  • Please provide referencing links when you're using information gathered from other posts. Doing so reflects positively on you by the Stack Overflow community. Commented Jun 15, 2015 at 18:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.