• JavaScript: Get browser window width and height

    The dimensions of the browser window can be determined using the followng width-height properties of the window object: window.innerWidth, window.innerHeight, window.outerWidth, and window.outerHeig...

  • Disabling the context menu using JavaScript

    How to disable the browser rightclick menu One may want to disable the right click context menu on a webpage for various reason. It could be to show a custom context menu or to prevent images from be...

  • JavaScript: Get screen width and height (resolution)

    The screen resolution of a device can be determined using the screen object. screen.width returns the width of the screen, while screen.height returns the height of the screen.

  • Why the names btoa and atob for Base64 encoder decoder functions?

    Why are they named btoa() and atob()? If you have ever needed to encode text to Base64 or decode a Base64 encoded string to plain text, you should be familiar with the methods btoa() and atob(). Thei...