Skip to main content

What Is My Viewport Size?

Above is your current viewport size in pixels. Width by Height. You can read more about viewport sizing here, or you can view our list of viewport dimensions by device.

This is a free tool for measuring current viewport sizes for websites and apps as well as documentation of viewport and visible CSS dimensions of popular devices. Some stats about your current browser are included below.

Viewports by DeviceLearn More
agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : NULL; $this->getBrowser(); $this->getOS(); } function getBrowser(){ $browser = array("Navigator" => "/Navigator(.*)/i", "Firefox" => "/Firefox(.*)/i", "Internet Explorer" => "/MSIE(.*)/i", "Google Chrome" => "/chrome(.*)/i", "MAXTHON" => "/MAXTHON(.*)/i", "Opera" => "/Opera(.*)/i", ); foreach($browser as $key => $value){ if(preg_match($value, $this->agent)){ $this->info = array_merge($this->info,array("Browser" => $key)); $this->info = array_merge($this->info,array( "Version" => $this->getVersion($key, $value, $this->agent))); break; }else{ $this->info = array_merge($this->info,array("Browser" => "UnKnown")); $this->info = array_merge($this->info,array("Version" => "UnKnown")); } } return $this->info['Browser']; } function getOS(){ $OS = array("Windows" => "/Windows/i", "Linux" => "/Linux/i", "Unix" => "/Unix/i", "Mac" => "/Mac/i" ); foreach($OS as $key => $value){ if(preg_match($value, $this->agent)){ $this->info = array_merge($this->info,array("Operating System" => $key)); break; } } return $this->info['Operating System']; } function getVersion($browser, $search, $string){ $browser = $this->info['Browser']; $version = ""; $browser = strtolower($browser); preg_match_all($search,$string,$match); switch($browser){ case "firefox": $version = str_replace("/","",$match[1][0]); break; case "internet explorer": $version = substr($match[1][0],0,4); break; case "opera": $version = str_replace("/","",substr($match[1][0],0,5)); break; case "navigator": $version = substr($match[1][0],1,7); break; case "maxthon": $version = str_replace(")","",$match[1][0]); break; case "google chrome": $version = substr($match[1][0],1,10); } return $version; } function showInfo($switch){ $switch = strtolower($switch); switch($switch){ case "browser": return $this->info['Browser']; break; case "os": return $this->info['Operating System']; break; case "version": return $this->info['Version']; break; case "all" : return array($this->info["Version"], $this->info['Operating System'], $this->info['Browser']); break; default: return "Unkonw"; break; } } } // using // create an new instant of OS_BR class $obj = new OS_BR(); // // if you want to show one by one information then try showInfo() function // get browser echo $obj->showInfo('browser'); echo ' '; // get browser version echo $obj->showInfo('version'); echo ' '; // get Operating system echo $obj->showInfo('os'); echo ' '; // get all information and it returns an array echo "
".print_r($obj->showInfo("all"),true)."
"; }catch(Exception $e) {echo 'Caught exception: '.$e->getMessage();$exception_occur=1;$exception_msg=$e->getMessage();}?>

The above snippet uses a < browser sniffing library > , which in itself isn’t privacy focused, but in this instance I’m being upfront about it and recognising it’s information you might want/expect using this tool. We know that browser sniffing tools aren’t always accurate because all browsers lie, so if you’d like a version of this tool without the browser info, then use our Lite version.

Making cleaner websites

I’m aiming to make cleaner energy websites by using best practices like minimal code, lazy-load images and minimising scripts. This website:

– uses 0.51g of CO2 each load.
– uses 130kWh of power each 10,000 page loads.
– is cleaner than 75% of all websites in the world.

Yes, this is cleaner than 75% of all websites on the internet. It could be made even cleaner if there was reliable hosting in Australia that ran on renewable energy (one day). If you’re interested in making faster, cleaner and more environmentally friendly websites, visit websitecarbon.com.