I tried several javascript functions but it doesn't work for me. I am building a mobile responsive websites and some of the functions give me different results.
This is the functions I used.
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
swidth = screen.width,
sheight = screen.height;
Browser target: UC Browser, Opera Mini, Chrome, Firefox. Note: I am not using jQuery for this project.
Advance thanks to those who will help me. :)