May 26, 2016

Viagra Vs Cialis

Viagra vs cialis I unashamedly maintain that there is so much more to being successful on the mobile web than dealing with screen size. Viagra vs cialis But I do accept that dealing with screen size is at least a first step.

Viagra vs cialis Thank goodness then, viagra vs cialis that the matter of screen size is so simple and well understood.

Viagra vs cialis Really?

Viagra vs cialis As web developers, viagra vs cialis we will often need to know the screen size of the device we are displaying content on. Viagra vs cialis Perhaps on the server, viagra vs cialis perhaps on the client, viagra vs cialis perhaps to be used as a clause in a media query.

Viagra vs cialis But how best to measure it? And what are we measuring anyway? On the client-side, viagra vs cialis for instance, viagra vs cialis a variety of ways exist to determine screen and page size: things like screen.width, viagra vs cialis window.outerWidth, viagra vs cialis document.body.clientWidth, viagra vs cialis and so on. Viagra vs cialis But these properties are infamously unspecified by any standards: so what do they all mean – and how reliable are they on mobile browsers?

Viagra vs cialis Required reading at this point is PPK’s viewport article. Viagra vs cialis With an article of tables from him that long, viagra vs cialis you know something’s up.

Viagra vs cialis But last week I pushed out an update to which allows client-side screen size parameters. Viagra vs cialis Which parameters should mobile developers use? And when?

Viagra vs cialis

Viagra vs cialis So for this blog post, viagra vs cialis I looked at a range of these metrics, viagra vs cialis and recorded their values for a variety of mobile browsers and page conditions. Viagra vs cialis I’ve been working in mobile for far too long, viagra vs cialis but still, viagra vs cialis the amount of diversity in the results shocked me. Viagra vs cialis Read on for the gory details, viagra vs cialis or skip to the end for the TLDR. Viagra vs cialis I think there are some interesting findings.


Viagra vs cialis The tests comprised a very simple web page, viagra vs cialis containing several paragraphs of meaningless Latin, viagra vs cialis and a JavaScript function that runs to take screen measurements within the browser. Viagra vs cialis The following properties are sought:

  • screen.width
  • screen.availWidth
  • window.outerWidth
  • window.innerWidth
  • document.body.clientWidth
  • document.body.offsetWidth
  • @media device-width
  • @media width
  • screen.height
  • screen.availHeight
  • window.outerHeight
  • window.innerHeight
  • document.body.clientHeight
  • document.body.offsetHeight
  • @media device-height
  • @media height
  • window.orientation
  • @media orientation

Viagra vs cialis The CSS media query properties (device-width, viagra vs cialis orientation, viagra vs cialis etc) are taken programmatically by evaluating expressions with the matchMedia() function, viagra vs cialis supported in iOS v5.0 and Android v4.0.

Viagra vs cialis I’m sorry to say that the tests were run on emulators rather than real devices, viagra vs cialis but covered iPhone (iOS v5.0 and iOS v4.3), viagra vs cialis Android v2.3, viagra vs cialis Android v4.0, viagra vs cialis and Opera Mobile v11.0. Viagra vs cialis The Android and Opera simulators were set to use HVGA (320×480) so as to have conditions as consistent with the iPhone as possible. Viagra vs cialis (Even though the actual physical screen of a retina iPhone is 640×960, viagra vs cialis this HVGA resolution is the one reported to the software APIs).

Viagra vs cialis The tests were run with two different HTML document types – HTML5 and XHTML-MP – and also a third time with no doctype specified. Viagra vs cialis The tests were also run both with and without a viewport meta tag to control the default width (constrained to ‘device-width‘) and scaling. Viagra vs cialis Additionally each device was tested with landscape as well as portrait orientation – making a total of 12 test combinations for each browser.

Viagra vs cialis For the iPhone and Android browsers, viagra vs cialis PhoneGap-wrapped versions of the test pages were also run (without the viewport meta tag), viagra vs cialis and finally, viagra vs cialis for iOS v5.0, viagra vs cialis the iPhone’s ‘Add to Homescreen’ technique was used (with the apple-mobile-web-app-capable meta tag) to launch portrait versions of the tests in a full-screen mode.

Viagra vs cialis As if all those combinations were not enough, viagra vs cialis the properties were accessed four times during the lifecycle of the page: a) inline before the <body> tag, viagra vs cialis b) after the </body> tag, viagra vs cialis c) on the document’s load event, viagra vs cialis and d) one more time, viagra vs cialis 250ms later. Viagra vs cialis I had a hunch that the values – at least those relating to page height – might change throughout this lifecycle.


Viagra vs cialis The full set of results is available here. Viagra vs cialis The various combinations of conditions are across the top, viagra vs cialis and operating systems (and measurements made) are down the left. Viagra vs cialis Each cell shows the value returned from the relevant API call, viagra vs cialis and ‘-‘ is used where the call failed or returned an undefined value.

Viagra vs cialis Where the value changed during the lifecycle of the page, viagra vs cialis slashes delimit the change, viagra vs cialis and a letter is used to indicate at which of the four measuring points the value changed. Viagra vs cialis So for example, viagra vs cialis ‘208/c:1962‘ means that a value was 208 before the <body> and after the </body>, viagra vs cialis but then it changed to 1962 for ‘c’, viagra vs cialis the document’s load event, viagra vs cialis and remained so 250ms later.

Viagra vs cialis There’s a lot to digest in there, viagra vs cialis although you may at least have noticed – as I have – that homogeneity is scarce. Viagra vs cialis You may notice some particularly strange results, viagra vs cialis particularly on Android, viagra vs cialis but also on iOS and Opera. Viagra vs cialis Let’s analyze the data by slicing the findings by property measured, viagra vs cialis dicing by operating system, viagra vs cialis and trying to digest the whole sorry lot.


screen.width & .height

Viagra vs cialis These two properties are generally understood to return the physical dimensions of the screen upon which a browser is running. Viagra vs cialis On desktop browsers, viagra vs cialis they will return you 1024×768, viagra vs cialis 1440×900, viagra vs cialis 1600×1200 and so on, viagra vs cialis regardless of how the actual browser window is sized. Viagra vs cialis On mobile devices, viagra vs cialis one would expect the same behavior, viagra vs cialis and get full physical screen sizes.

Viagra vs cialis Well, viagra vs cialis close. Viagra vs cialis But no cigar.

Viagra vs cialis Opera Mobile and Android v4.0 (as well as v2.3 in a PhoneGap app) behave most intuitively in this regard, viagra vs cialis and will indeed report 320×480 or 480×320 for portrait and landscape respectively.

Viagra vs cialis iOS also consistently reports the physical dimensions of the screen (320×480), viagra vs cialis but notably fails to flip them for a change or orientation. Viagra vs cialis So be aware that in landscape mode, viagra vs cialis your browser’s width will actually, viagra vs cialis apparently, viagra vs cialis be reported to be larger than the screen’s.

Viagra vs cialis Android v2.3, viagra vs cialis in a regular browser scenario, viagra vs cialis however, viagra vs cialis displays even more curious behavior. Viagra vs cialis Its screen.width always starts off as 800 – which is clearly some sort of virtual viewport, viagra vs cialis rather than the physical screen. Viagra vs cialis But when the document has an XHTML-MP doctype, viagra vs cialis or a constrained viewport (for any doctype), viagra vs cialis the value will switch, viagra vs cialis by the time of the document load event, viagra vs cialis to be the 320 or 480 you might expect.

Viagra vs cialis Now this might be tolerable if you remember to wait for documents to fully load before accessing this property, viagra vs cialis but even that caution is blown to the wind by Android v2.3’s screen.height behavior.

Viagra vs cialis With a non-constrained viewport, viagra vs cialis a portrait orientation, viagra vs cialis and with no doctype, viagra vs cialis screen.height was reported during this test as 1003. Viagra vs cialis With an HTML5 doctype, viagra vs cialis it also switched to 1003, viagra vs cialis but only after dallying at 498 until at some point after the document load event. Viagra vs cialis With an XHTML-MP doctype, viagra vs cialis it also started out at 498, viagra vs cialis but then dropped to about 40% of that value (199) by the time of the document load. Viagra vs cialis With a constrained viewport, viagra vs cialis behavior was stable as a function of doctype, viagra vs cialis but also demonstrated the 60% drop at document load: from 1003 down to 401.

Viagra vs cialis Landscape-wise, viagra vs cialis the same sort of issues occur: with no doctype, viagra vs cialis screen.height is a reliable 402; and with an HTML5 doctype, viagra vs cialis the same value is also (eventually) returned. Viagra vs cialis The XHTML-MP doctype, viagra vs cialis or a constrained viewport, viagra vs cialis will cause the eventual value to be 241, viagra vs cialis but by way of various intriguing values. Viagra vs cialis Our constrained, viagra vs cialis HTML5 document, viagra vs cialis for example, viagra vs cialis reported 372 before and after the <body/>, viagra vs cialis 223 on load, viagra vs cialis and 241 at some point afterwards.

Viagra vs cialis Yes, viagra vs cialis these actual values are probably dependent upon the length of my particular test page itself, viagra vs cialis but remember that these are supposed to be the physical screen dimensions, viagra vs cialis folks!

Viagra vs cialis Some semblance of normality returns to Android v2.3 in the PhoneGap environment. Viagra vs cialis The values of 455 and 295 are hardly accurate measures of physical screen size, viagra vs cialis either (since bizarrely they seem to take the 25 pixel status bar into account!), viagra vs cialis but at least they’re close, viagra vs cialis and hooray: take solace that the value does not change during the page lifecycle.

screen.availWidth & .availHeight

Viagra vs cialis In the desktop world, viagra vs cialis the available width and height returned by these two properties still relate to the whole screen, viagra vs cialis rather than the browser’s window, viagra vs cialis but they take operating system chrome into account. Viagra vs cialis The menu bar in OSX means that screen.availHeight is at least 26 pixels less than screen.height, viagra vs cialis for example – although the width values will probably be the same (unless you have a non-minimizing dock on the side of the screen).

Viagra vs cialis In mobile, viagra vs cialis one might expect the available values to take into account any OS status bar height. Viagra vs cialis Let’s see, viagra vs cialis shall we?

Viagra vs cialis I need to caveat the Opera results here, viagra vs cialis since the simulator runs in a dedicated window without any ‘real device’ chrome. Viagra vs cialis But that should have implied that its available dimensions are the same as the screen’s – and this was not what was seen. Viagra vs cialis In fact, viagra vs cialis the availHeight is reduced to 369 from a height of 480, viagra vs cialis not by any OS chrome, viagra vs cialis but by the browser’s own rather fat chrome. Viagra vs cialis This is not what is expected – even if, viagra vs cialis on a real device, viagra vs cialis it emerges that the OS chrome is deducted too.

Viagra vs cialis And having labored over Android v2.3, viagra vs cialis above, viagra vs cialis there’s not much more to say here about that operating system either. Viagra vs cialis Without exception it depressingly reports exactly the same values for availWidth and availHeight as it did for width and height – although at least that means that the PhoneGap values are now correct! Android v4.0’s browser also reports the same available values as it did for total width and height, viagra vs cialis but fortunately they were slightly more sensible to begin with. Viagra vs cialis But bizarrely the PhoneGap app doesn’t take the status bar height off as it does for v2.3.

Viagra vs cialis And then there’s iOS: it does successfully deduct 20 pixels for the operating system’s chrome. Viagra vs cialis But remember that orientation is ignored! So although a portrait availHeight is sensibly 460 (having dropped from 480), viagra vs cialis it is anti-intuitively the width in a landscape orientation that is reduced (from 320 to 300) by a bar at the top of the screen!

Viagra vs cialis Quirks on all fronts. Viagra vs cialis Sigh.

window.outerWidth & .innerWidth

Viagra vs cialis In contrast to the screen properties, viagra vs cialis the window properties are understood to refer to the browser window itself. Viagra vs cialis For desktop browsers, viagra vs cialis (at least, viagra vs cialis when they’re not running in full-screen mode), viagra vs cialis the outer dimensions will normally be smaller than those for the screen. Viagra vs cialis The inner dimensions then further deduct browser chrome: window borders, viagra vs cialis toolbars, viagra vs cialis status bars, viagra vs cialis and so on, viagra vs cialis and so they are normally smaller still.

Viagra vs cialis In mobile, viagra vs cialis we might expect the outer values to more or less match those for the available screen – since apps run full size. Viagra vs cialis And indeed, viagra vs cialis with window.outerWidth, viagra vs cialis we have a good news story.

Viagra vs cialis iOS v5.0 uses window.outerWidth to redeem itself over the lack of the orientation’s effect on screen. Viagra vs cialis It is 320 for portrait viewing, viagra vs cialis and 480 for landscape viewing. Viagra vs cialis Bam.

Viagra vs cialis Opera does the same. Viagra vs cialis Bam. Viagra vs cialis Astonishingly, viagra vs cialis Android v2.3 also nails it. Viagra vs cialis Bam.

Viagra vs cialis In fact, viagra vs cialis the only small blot that stops window.outerWidth being the model student is Android v4.0 in landscape: the property often has the portrait value of 320 before the <body> tag is reached. Viagra vs cialis However, viagra vs cialis this is arguably an edge case, viagra vs cialis and a very minor misdemeanor.

Viagra vs cialis After that rousing news, viagra vs cialis it’s back to earth with a small bump for window.innerWidth. Viagra vs cialis If your desktop experience had convinced you that innerWidth must be the same or smaller than outerWidth, viagra vs cialis you’ve now got the TARDIS-like experience of mobile viewports to enjoy.

Viagra vs cialis Without dropping into classic viewport theory here, viagra vs cialis it’s sufficient to say that WebKit mobile browsers seem to use the boundary between the window’s ‘inner’ and ‘outer’ width and height properties to delineate the world of physical pixels and the world of viewport pixels: the latter a realm where zooming, viagra vs cialis pinching and tapping allow the mobile browser to sensibly scale web pages designed for much larger screens.

Viagra vs cialis For those pages where the viewport’s behavior is constrained, viagra vs cialis perhaps through the use of meta tags, viagra vs cialis this is of little concern, viagra vs cialis since the mapping of the two worlds is 1:1. Viagra vs cialis And indeed, viagra vs cialis in our tests, viagra vs cialis when such a tag is present, viagra vs cialis innerWidth takes exactly the same value as outerWidth – modulo the Android race conditions, viagra vs cialis at least.

Viagra vs cialis Less well-known might be the fact that, viagra vs cialis for all these browsers, viagra vs cialis when an XHTML-MP doctype is present, viagra vs cialis the same is also true. Viagra vs cialis We’ve alluded to this already: the presence of this forces the viewport width to be the same as the physical width of the screen (either 320 or 480), viagra vs cialis while still allowing subsequent scaling.

Viagra vs cialis And of course, viagra vs cialis PhoneGap’s default configuration is also to constrain the viewport, viagra vs cialis so the values there also match.

Viagra vs cialis But when the viewport has not been constrained, viagra vs cialis and an HTML5 doctype (or none at all) is used, viagra vs cialis innerWidth will suddenly start to represent values much larger than the physical screen: and represent the width of the viewport canvas upon which the page has been rendered.

Viagra vs cialis On a portrait iPhone, viagra vs cialis for example, viagra vs cialis the default viewport is 980 pixels. Viagra vs cialis On a landscape iPhone it is, viagra vs cialis well, viagra vs cialis according to window.innerWidth, viagra vs cialis 981 (yes, viagra vs cialis really).

Viagra vs cialis Android 2.3 and earlier used a different value of 800 for the default viewport width, viagra vs cialis and this is exposed as window.innerWidth (as well as the vestigal value before document load for the constrained tests). Viagra vs cialis With Android 4.0, viagra vs cialis the default viewport has been brought in line with the iPhone’s: 980 pixels.

window.outerHeight & .innerHeight

Viagra vs cialis Mobile browsers normally have no vertical chrome, viagra vs cialis so apart from the matter of viewports, viagra vs cialis outerWidth and innerWidth values corresponded relatively nicely. Viagra vs cialis However, viagra vs cialis they do have horizontal chrome elements: address bars at top, viagra vs cialis and toolbars at bottom. Viagra vs cialis So we should expect the height to be reduced accordingly.

Viagra vs cialis Opera, viagra vs cialis in a way, viagra vs cialis gets this right. Viagra vs cialis We have already pointed out it surprisingly deducted the browser chrome to calculate its screen.availHeight. Viagra vs cialis But since it then promptly uses the same value for window.outerHeight and window.innerHeight, viagra vs cialis it meets our expectations on the latter of these two properties at least.

Viagra vs cialis For Android, viagra vs cialis window.outerHeight is also relatively deterministic. Viagra vs cialis Again, viagra vs cialis there are timing wobbles, viagra vs cialis but after page load, viagra vs cialis the values are consistently 455 (in portrait) and 295 (in landscape). Viagra vs cialis The Android OS bar, viagra vs cialis as we’ve mentioned, viagra vs cialis is 25 pixels.

Viagra vs cialis But it’s iOS that baffles this time. Viagra vs cialis Only in homescreen mode, viagra vs cialis with an HTML5 doctype (or none at all), viagra vs cialis does the browser report the expected window.outerHeight value of 460.

Viagra vs cialis In all other cases, viagra vs cialis bizarre numbers come out. Viagra vs cialis For iOS v5.0, viagra vs cialis for constrained portrait pages, viagra vs cialis it’s 356 that becomes 445. Viagra vs cialis For non-constrained portrait pages it’s 356 that becomes 1602. Viagra vs cialis For constrained landscape pages it’s 208 that becomes 667. Viagra vs cialis For non-constrained portrait pages it’s 208 that becomes 1702. Viagra vs cialis In PhoneGap, viagra vs cialis it’s 460 that becomes 1602, viagra vs cialis or 480 that becomes 1202. Viagra vs cialis And for constrained homescreen apps, viagra vs cialis it’s 480 that becomes 1602.

Viagra vs cialis The fact that this is the one property whose values significantly vary from iOS v4.3 to iOS v5.0 also raises alarm bells.

Viagra vs cialis Perhaps we could write a whole blog post to reverse engineer is going on here. Viagra vs cialis 356 and 208 seem to have some plausibility, viagra vs cialis but apart from that – who knows? There’s no apparent Safari documentation for this property, viagra vs cialis and even WebCore’s own test suite describes the expected results as ‘empirical‘.

Viagra vs cialis I think I can safely caution you never to use window.outerHeight in iOS and expect a meaningful answer.

Viagra vs cialis After that, viagra vs cialis window.innerHeight seems relatively stable and predictable. Viagra vs cialis In constrained (and XHTML-MP) scenarios in the regular iOS browser, viagra vs cialis it sits at that familiar 356 value for portrait and 208 for landscape. Viagra vs cialis This is the actual inner height of the browser window, viagra vs cialis sans browser chrome, viagra vs cialis as per documentation. Viagra vs cialis (The fact that these two values are not the same amount less than the physical screen dimensions is due to the fact that the landscape toolbar is slightly shallower than the portrait one.)

Viagra vs cialis This pattern is also consistent when the page is launched constrained from the homescreen or in a PhoneGap application. Viagra vs cialis Here, viagra vs cialis without any browser chrome at all, viagra vs cialis the values correctly return to the physical screen dimensions minus the 20 pixel tool bar.

Viagra vs cialis However, viagra vs cialis this value is not as trustworthy when the page has a non-constrained viewport and an HTML5 (or omitted) doctype. Viagra vs cialis In our test, viagra vs cialis window.innerHeight had values of 1091 and 425 for the two orientations – doubtless dependent upon the length of the content in our actual page – and hard to predict. Viagra vs cialis As if to prove that point, viagra vs cialis in homescreen mode, viagra vs cialis this value increases to 1409. Viagra vs cialis Not particularly useful.

Viagra vs cialis When we look at window.innerHeight for Android, viagra vs cialis the results appear to follow a similar pattern, viagra vs cialis but, viagra vs cialis as usual, viagra vs cialis are somewhat obfuscated by the fact they change throughout the page lifecycle. Viagra vs cialis For constrained viewports, viagra vs cialis the two orientations’ values are 401 and 241 in Android v2.3 (where the address bar is 54 pixels high), viagra vs cialis and 403 and 243 in Android v4.0 (where the address bar is 52 pixels high), viagra vs cialis and the PhoneGap values are also as expected, viagra vs cialis considering there is no address bar.

Viagra vs cialis But again, viagra vs cialis the determinism disappears when the viewport is not constrained, viagra vs cialis the reported values as varied 1234, viagra vs cialis 496, viagra vs cialis 1003 and 402. Viagra vs cialis We can deduce that these are viewport lengths rather than window size, viagra vs cialis that they are content-dependent, viagra vs cialis and that they change between platform versions due to the updated viewport width – but again, viagra vs cialis their utility is more doubtful than in the constrained scenarios.

body.offsetWidth, viagra vs cialis .clientWidth, viagra vs cialis .offsetHeight, viagra vs cialis & .clientHeight

Viagra vs cialis We move onto our final set of JavaScript APIs, viagra vs cialis and we might hope that we are leaving the vagaries of BOM implementations and entering the consistency of the DOM & CSSOM (although, viagra vs cialis sadly, viagra vs cialis these properties are still not under the purview of any W3C standard).

Viagra vs cialis These four values should theoretically be available on all DOM elements: the ‘offset’ dimensions include an element’s content, viagra vs cialis padding and border, viagra vs cialis while the ‘client’ dimensions are the content and padding alone. Viagra vs cialis Neither include the margin, viagra vs cialis as detailed in Mozilla’s documentation.

Viagra vs cialis In our case, viagra vs cialis we are querying these properties for the document’s body, viagra vs cialis and, viagra vs cialis since it has no border, viagra vs cialis the offset and client values should be the same. Viagra vs cialis Our test pages add a CSS margin of 10 pixels, viagra vs cialis so on the desktop, viagra vs cialis we would expect its width, viagra vs cialis at least, viagra vs cialis to be 20 pixels less than window.innerWidth. Viagra vs cialis Empirically, viagra vs cialis desktop browsers seem to use the two heights to represent the total length of the page, viagra vs cialis rather than the height of the window display. Viagra vs cialis (I’d thought that would be body.scrollHeight, viagra vs cialis but that’s another story.)

Viagra vs cialis How do mobile browsers fare? How does the viewport concept affect these values?

Viagra vs cialis With offsetWidth and clientWidth, viagra vs cialis iOS and Android work broadly as you would expect. Viagra vs cialis The non-constrained viewports return measurements in the high 900s (and around 800s for Android v2.3), viagra vs cialis and the constrained pages in the low 300s (for portrait) and mid 400s (for landscape).

Viagra vs cialis It’s notable how and when the choice of doctype affects these values though. Viagra vs cialis With an HTML5 doctype, viagra vs cialis non-constrained viewport tests on both platforms report 20 pixels less than the viewport size for both values: 960 pixels regardless of orientation.

Viagra vs cialis With an XHTML-MP doctype, viagra vs cialis as we’ve previously mentioned, viagra vs cialis the viewport becomes the device width by default, viagra vs cialis and again 20 pixels are correctly deducted to give us values of 300 and 460 in landscape and portrait respectively. Viagra vs cialis The same expected behaviour is seen with HTML5 doctypes used on constrained viewports.

Viagra vs cialis What is slightly strange is when no doctype is used. Viagra vs cialis In this case, viagra vs cialis again on both platforms in all scenarios, viagra vs cialis the clientWidth is the full viewport width (980, viagra vs cialis 800, viagra vs cialis 480 or 320), viagra vs cialis and the offsetWidth is reduced by the margin (to 460, viagra vs cialis 780, viagra vs cialis 460, viagra vs cialis or 300). Viagra vs cialis This seems systemic: as though the lack of doctype puts the browser into a mode where it interprets the body’s margin as a border.

Viagra vs cialis Across all of our testing combinations, viagra vs cialis though, viagra vs cialis the offsetHeight and clientHeight values are the most bizarre set of results in the whole experiment.

Viagra vs cialis There are three patterns on Android and iOS. Viagra vs cialis Firstly, viagra vs cialis pages with no doctype will always have clientHeight equal to window.innerHeight once the </body> tag has closed – but the offsetHeight will be completely different. Viagra vs cialis Secondly, viagra vs cialis when there is a doctype, viagra vs cialis the clientHeight and offsetHeight are always the same, viagra vs cialis and nearly always regardless of what the doctype actually is. Viagra vs cialis (The bizarre exception is Android v2.3 where the HTML5 doctype on the non-constrained viewport causes both values to reduce dramatically at some point after the document load event). Viagra vs cialis And finally, viagra vs cialis the offsetHeight value of the non-doctype test always produces the same values as the clientHeight and offsetHeight of the HTML5 equivalent.

Viagra vs cialis Got that?

Viagra vs cialis But what the values actually are seems extremely non-deterministic. Viagra vs cialis We’ve already commented on the arbitrary nature of window.innerHeight which the non-doctype results seem to echo. Viagra vs cialis But despite the doctype, viagra vs cialis orientation and viewport size, viagra vs cialis the meaning of these values would seem very hard to assess. Viagra vs cialis The best we can say is that when clientWidth or offsetWidth go up, viagra vs cialis clientHeight or offsetHeight go down (as seems sensible), viagra vs cialis but that no attention seems to be paid to our 20 pixel margin.

Viagra vs cialis Again, viagra vs cialis properties best left alone, viagra vs cialis I think.

Viagra vs cialis In contrast to iOS and Android, viagra vs cialis which use window outer and inner dimensions as the point of delineation between physical pixels and the viewport, viagra vs cialis Opera Mobile’s strategy seems to have been to to stay in the world of real pixels until this last document.body set of measurements, viagra vs cialis and finally we get a sense of how it sizes the viewport.

Viagra vs cialis The default viewport width seems to be 850 pixels, viagra vs cialis but although Opera has, viagra vs cialis until now, viagra vs cialis remained oblivious to the pages’ doctypes, viagra vs cialis the values seem to suddenly be very dependent upon them. Viagra vs cialis With an HTML5 doctype on a non-constrained viewport, viagra vs cialis both clientWidth and offsetWidth are 830 (which probably has had the 20 pixel margin deducted), viagra vs cialis and with XHTMLMP, viagra vs cialis we get 300 or 460 (which would be consistent with a constrained viewport, viagra vs cialis also minus margins).

Viagra vs cialis But with no doctype and no viewport constraint, viagra vs cialis in either portrait or landscape, viagra vs cialis we get 850 for clientWidth (i.e. Viagra vs cialis no padding) and… for offsetWidth, viagra vs cialis 2048! What?

Viagra vs cialis And finally, viagra vs cialis as they were for iOS and Android, viagra vs cialis the clientHeight and offsetHeight are a fairly disparate bunch of values. Viagra vs cialis The only assumptions we can make are that a) constrained clientHeight with no doctype will be the same as window.innerHeight after the </body> tag; that b) clientHeight and offsetHeight for constrained HTML and any type of XHTML-MP will all be the same value for a given orientation (and that non-constrained HTML5 will also eventually converge on that value sometime after the document load event); and c) that the values themselves will be more or less unpredictable.

Viagra vs cialis But perhaps not as meaningless as the offsetHeight for non-constrained doctype-less pages. Viagra vs cialis It’s consistent. Viagra vs cialis But a highly unlikely 40960 – which must surely, viagra vs cialis more or less, viagra vs cialis mean undefined!

@media device-width & width, viagra vs cialis device-height & height

Viagra vs cialis We conclude the menagerie of screen dimensions by looking at the values used in CSS3 media queries. Viagra vs cialis These are used as ‘features’ in declarations which are used to conditionally load stylesheets or apply the rules within them. Viagra vs cialis Media queries are a staple of contemporary web design, viagra vs cialis and perhaps should be understood by designers as much as the other properties above need to be understood by developers handling layouts.

Viagra vs cialis Finally, viagra vs cialis we have some properties which are defined by a standard.

Viagra vs cialis Because, viagra vs cialis for this test, viagra vs cialis we needed to evaluate these values in JavaScript, viagra vs cialis we use the matchMedia function and varied the operand until it returned true. Viagra vs cialis This does mean we only have results for those devices which support that API call: namely iOS v5.0 and Android v4.0.

Viagra vs cialis Well it’s nice to end with some good news. Viagra vs cialis In both platforms, viagra vs cialis in all conditions, viagra vs cialis @media device-width always returns the same value as screen.width, viagra vs cialis and device-height always returns the same value as screen.height. Viagra vs cialis There’s no matchMedia support in Opera, viagra vs cialis but I’ll assume the same would be true.

Viagra vs cialis This is great – but of course don’t forget the main issue afflicting those measurements: the lack of rotated values in iOS and Android 2.3’s wacky 800 viewport value which I’ll postulate may be echoed here too.

Viagra vs cialis @media width and height also track other JavaScript properties in both platforms. Viagra vs cialis @media width is almost always equal to window.innerWidth (except in non-constrained landscape mode in iOS v5 when the former is 980 and the former that curious 981). Viagra vs cialis @media height is always equal to window.innerHeight.

Viagra vs cialis (It’s not so clear whether this pattern would be followed by Opera too, viagra vs cialis were we able to measure it this way. Viagra vs cialis To confirm, viagra vs cialis it would require a CSS-based test harness – perhaps another study.)

Viagra vs cialis But there are a couple of things worth saying about this observation. Viagra vs cialis Firstly, viagra vs cialis the window.innerWidth and window.innerHeight values themselves are something of a bit of a mixed bag. Viagra vs cialis See the earlier discussions above.

Viagra vs cialis Secondly, viagra vs cialis it’s interesting to note that the matchMedia result changes with page lifecycle in the same way that the regular JavaScript measures do. Viagra vs cialis This may mean that media queries change their results as the page loads – I don’t know how to predict when these parametric CSS rules are evaluated – and I imagine this might create conditions under which certain resources referred to in the CSS, viagra vs cialis loaded early in the page (when the size is evaluated to one thing), viagra vs cialis might turn out to have been unneccessary later in the page’s life (when the size is evaluated to quite another thing).

Viagra vs cialis Hardcore browser theory & probably more testing required.

window.orientation & @media orientation

Viagra vs cialis As a final aside, viagra vs cialis note that we also measured orientation results. Viagra vs cialis window.orientation returns the number of degrees (0 for portait, viagra vs cialis 90 for landscape), viagra vs cialis and is flawless in iOS, viagra vs cialis and set correctly after </body> on Android. Viagra vs cialis (Just remember not to evaluate orientation before the <body> – it’s likely still to be 0 in landscape mode)

Viagra vs cialis Opera does not seem to support the API.

Viagra vs cialis The media query equivalent is also apparently fine (where measurable). Viagra vs cialis The only Android timing quirk here is PhoneGap in portrait which thinks it’s landscape at first. Viagra vs cialis I guess nothing’s perfect.


Viagra vs cialis Wow. Viagra vs cialis Painful, viagra vs cialis on the whole.

Viagra vs cialis Let’s see what we can briefly conclude. Viagra vs cialis I’m not going to go back through each of the properties, viagra vs cialis but a couple of things jumped out at me.

  • Doctypes matter – you may have no intention of using an XHTML-MP doctype, viagra vs cialis but if you forget your HTML5 one, viagra vs cialis some measurements are affected.
  • Default viewports vary from 980 through 850, viagra vs cialis to 800, viagra vs cialis depending on platform. Viagra vs cialis Be aware that Android’s default has changed between v2.3 and v4.0.
  • Page lifecycle matters: even if you aren’t stupid enough to run measurement code before the <body>, viagra vs cialis it can still change radically afterwards, viagra vs cialis at the document load event, viagra vs cialis or – most painfully – sometime after that.
  • Race conditions seem more common on Android than on iOS – I admit this could also be affected by the poor performance of the platform’s emulator
  • Height measurements are probably too nerve-wracking to use – as might be expected. Viagra vs cialis Except in iOS, viagra vs cialis where you’ll need height to get width.
  • Nothing much is standardized and where viewports are involved, viagra vs cialis the chaos of interpretation ensues. Viagra vs cialis That matchMedia provides a JavaScript API into the (standardized) CSS3 properties might be a chink of light.

Viagra vs cialis But overall, viagra vs cialis the message should be: don’t take anything for granted. Viagra vs cialis Mobile diversity is, viagra vs cialis unsurprisingly, viagra vs cialis still with us with a vengeance – even for apparently simple things like screen size.

Viagra vs cialis Check out the table again, viagra vs cialis get a little scared, viagra vs cialis choose your APIs carefully, viagra vs cialis and test on real devices* like crazy.

Viagra vs cialis (* yes, viagra vs cialis yes, viagra vs cialis I still realize this whole experiment is underpinned by the ultimate sin of using emulators 🙂 )

Viagra vs cialis Thoughts? War stories? Techniques? Fears? Comments welcome.

Average Rating: 4.7 out of 5 based on 271 user reviews.

Comments (199)

  1. March 2, 2015

    Quality content is the main to attract the people
    to visit the website, that’s what this web site is providing.

  2. March 3, 2015

    We also provide possibilities for up and arriving popular
    music manufacturers around the globe to offer their beats online.

  3. March 3, 2015 said...

    So those are actually the details of Bitcoin as a currency system, however Bitcoin is
    actually also a settlement network.

  4. March 3, 2015
    Chandra said...

    whoah this blog is fantastic i really like studying your articles.
    Stay up the great work! You already know, lots of persons are hunting around for this information, you could help them greatly.

  5. March 5, 2015

    You have the chance to supply info regarding your criminal history that you feel supports
    your application for a licence.

  6. March 6, 2015
    Margaret said...

    So, make sure that you’ve this information before you’d put an order with this website.
    You no longer have to concern yourself with all the insurance claims.
    If necessary, find new traffic to love and receive love from.

  7. March 7, 2015
    Alycia said...

    Hi admin, i found this post on 14 spot in google’s search results.
    I’m sure that your low rankings are caused by high bounce rate.

    This is very important ranking factor. One of the biggest reason for high bounce rate
    is due to visitors hitting the back button. The
    higher your bounce rate the further down the search results your posts and pages will end up, so having reasonably low bounce rate is important for increasing your rankings naturally.
    There is very handy wp plugin which can help you. Just search in google
    Seyiny’s Bounce Plugin

  8. March 15, 2015
    tas polo said...

    Greetings I am so grateful I found your blog page, I really
    receive you by error, while I was searching on Askjeeve for anything else, Anyhow I am available now and would just
    like to say kudos for a remarkable post and a all round entertaining
    blog (I also enjoy design, I do not have time to browse
    it all at the moment but I have saved it and also added
    your bookmarks to my Google, so when I have opportunity I will be
    back to read a lot more, Please do carry on to date the great

  9. March 21, 2015
    Detox said...

    It’s good to find decent posts like this. I really liked it.

  10. April 5, 2015

    Faites des economies grace au rayon electromenager Cdiscount !

  11. April 7, 2015

    Hello mates, pleasant paragraph and good arguments commented at this place, I am actually enjoying by

  12. April 11, 2015
    brittaney556 said...

    Now i’m really glad I stumbled upon this posting. It’s nicely written and the information is excellent. I hope to uncover more like this.

  13. April 27, 2015

    Phen375 hasn’t just helped me lose weight. It’s literally altered my well being.
    My friends say they’ve never ever viewed me happier…and
    they are right . I am also in the new romantic relationship and he’s SO Popular!
    ” Alice Black colored, California state

    Just How Much Pounds Can I Get rid of?

    Phen375 helps thousands of people acquire the physique they have always dreamed about.

    The common guy using Phen375 once a day sheds 3-5 lbs in one full week.
    That’s more than a lb each and every 2 days!

    Phen375 is so highly effective that right after getting only 2 pills
    you may actually understand the kilos vanishing.

    columbiaHow Productive Is Phen375?

    According to a report at Columbia School, a person would need
    to go walking 40 several hours per week to give up the equivalent amount of weight as having 7 doses of Phen375.

    Contemplate everything you could achieve in the event you mixed exercising with the strength of Phen375!
    As well as, together with the additional strength Phen375 will give you, you will really
    would like to physical exercise.

  14. May 2, 2015
    Urine Drug Test said...

    Be properly prepared to pass your drug test

  15. May 7, 2015

    Hello, this weekend is fastidious for me, for the reason that
    this occasion i am reading this great informative post here
    at my house.

  16. May 12, 2015
    Guiseppe said...

    Thanks James, I think. This information is very handy but could you perhaps conclude with a piece of javascript that will do it’s best to yield the correct height/width of screen and document or window across all platforms. E.g. if this then that and so forth.

  17. June 12, 2015
    eddy2517 said...

    Now i’m really delighted I came across this posting. It’s well written and the content is great. I am hoping to uncover more like this.

  18. June 18, 2015
    danuta5887 said...

    Based on the amount of opinions, this is definately a very engaging topic. Whenever I come back to this post there’s an interesting guest post better than many of the previous ones.

  19. June 20, 2015
    emile4364 said...

    This wasn’t the web page I was trying to find but now I’m thankful I found it. I realize it is quite popular on the web. Good job.

  20. June 25, 2015

    Here’s an email all of us received only today: Mr. Nesson

  21. June 26, 2015
    Luennemann.Org said...

    He merely would have entered stage 1 of the drug plan, which
    would have led to increased testing—but just for 90 days.

  22. July 3, 2015
  23. July 20, 2015

    […] First, Understand Your Screen – […]

  24. August 8, 2015

    Buying a bag from this brand top of the range is sincerely a desire look legitimate for numerous women, having said that the giving cost creates it additional such as a good not achievable wish to have for many. possuindo, as an alternative to sulking or lashing out on management whenever he had been demoted in order to middle reduction, Hoffman silently tutored their replacement, Sara Axford, plus worked tenaciously through the summertime to improve. You can find obviously most of the, nevertheless the issue with by using technique is the fact that you’ll still need to pay superior prices, as well as the variety might be even more restricted his or her fingers are linked in terms of the car dealership agreements they have got with all the providers. Since it is better to get your nearly ideal like new handbag insist they will possess a invoice from the corporation who is certified to offer Chanel handbags such as Saks fifth Avenue or even coming from a Chanel store. The specific Chanel handbags are usually inexpensive along with any with the outfits putting on because the casual positioned on selection might be discovered in several colors and styles.

  25. September 15, 2015


  26. September 17, 2015
    maude2955 said...

    Great post. Among the best I’ve come upon.

  27. September 29, 2015
    focus excellent said...

    Excellent post. Keep posting such kind of information on your page.
    Im really impressed by it.
    Hey there, You have done an excellent job. I’ll certainly digg it
    and individually suggest to my friends. I am confident they’ll be benefited from
    this web site.

  28. September 30, 2015

    The subjeasses, polarized fishing sun glasses, rimless sunglasses, prescription swim goggles, baby sunglassesight Out at the Forum Shops. Enjoy makeovers with the talented experts at Dior Beauty where you’ll fometimes more expensive, than in Europe or the US, but you’ll also find designs only available in Ashours for “flat landers,” says Andy Chapman, spokesman for the North Lake Tahoe Marketing Cooperativ the question is, if I see the enemy, what should I do? That would vary from “Do nothing,we’ve got t its head by taking a classic oxford last and encasing it in a glossy sheet of black patent leather.ats, but they also eat very little overall just to stay skinny.. The “Modern Blazer” ($695) is an ed with eCommerce, while empowering business users and delivering unprecedented ROI.

  29. November 10, 2015

    What i do nnot realize is actually how you are not actually much more
    well-favored than you might be now. You are very intelligent.
    You recognize thus significantly in the caxe of this topic, made mee personally believe it from so many numerous angles.

    Its like women and men aren’t interested until it’s something
    to accomplish with Woman gaga! Your personal stuffs
    excellent. At all times maintain it up!

  30. November 13, 2015
    Alpha Aminos 30 said...

    I hav been browsing online more than 3 hours today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. Personally,
    if all webmasters and bloggerrs made good content
    as you did, the web will be much more useful than ever before.

  31. November 13, 2015

    I enjuoy what you guys tend to be upp too. Succh clever work and exposure!

    Keep up the awesome works guys I’ve you gyys to myy blogroll.

  32. November 14, 2015
    Peggy said...

    I am genuinely delighted to read this webpage posts which contains lots of valuable facts, thanks ffor providinjg these statistics.

  33. November 15, 2015

    Hi, I wish for to subscribe for this weblog to get hottest updates, therefore where can i do it please assist.

  34. November 16, 2015
    kathe8770 said...

    I’ve got to say that this is certainly one of many eye-catching postings I’ve found on this niche. I could certainly keep an eye on your posts.

  35. December 3, 2015
    guide budapest said...

    Thats a really good article, talent writer.

  36. December 23, 2015
    mallie8702 said...

    Only if I could come across some more posts like this one, that would be awesome.

  37. January 13, 2016
    debrah8669 said...

    My spouse and I almost didn’t check this site out nonetheless I’m just thankful I have. That it is very good when compared to others I’ve found. I will certainly return.

  38. February 19, 2016
    security said...

    Hi, thanks for speaking about the new Ubuntu release. This is one of the best releases and i have it installed on my computer at home. the only issue is buggy nvidia driver.

  39. February 21, 2016
    ilene7844 said...

    Wonderful material when compared to many of the other posts I’ve checked out. Continue the good work.

  40. February 25, 2016

    Excellent site you have here.. It’s hard to find high quality
    writing like yours nowadays. I really appreciate people like you!
    Take care!!

  41. March 23, 2016
    elvis5440 said...

    Excellent submit. Seems as though much time and effort went into this one.

  42. April 10, 2016
    bennie8969 said...

    You will hardly come across content such as this anymore. I recall when you could find one or two posts like this in less than 10 minutes however now it’s significantly more difficult.

  43. April 20, 2016
    carolin9916 said...

    Very good information in comparison to many of the similar subject material I’ve read. Carry on the nice work.

  44. April 26, 2016
    stat detox said...

    Excellent information in comparison to some of the other subject material I’ve checked out. Continue the nice work.

  45. April 27, 2016
    seo plugin said...

    Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword….wait there’s even more Now what if i told you there was a simple WordPress plugin that does all the On-Page SEO, and automatically for you? That’s right AUTOMATICALLY, just watch this 4minute video for more information at. Seo Plugin

  46. May 3, 2016
    lazaro8678 said...

    This is easily some of the best information I’ve stumbled on today. It’s not what I was looking for but it sure got my attention. Now i’m glad I took the time to look it over.

  47. May 14, 2016
    24 hour detox said...

    It is always just so refreshing to see decent content such as this considering the unnecessary material that’s out there. After all, you can just tell that alot of time and patience with into this. Do you use content writers or do you create your own content?

  48. May 17, 2016
    quick detox said...

    You hardly come across content such as this nowadays. I remember when you could find a few topics similar to this in a few minutes however now it’s much harder.

Leave a Reply