Copy to Clipboard in pure javascript


copy to clipboard helps a user to quickly copy some particular text clicking on a button. Nowadays It’s a good user experience to avoid CTRL + C or right click open context menu and click copy.

Earlier we had to use some flash plugin to use this feature into a web app. The accessing clipboard was not enabled due to security reason. Now some modern browser supports document.execCommand() key method. In this tutorial, we’ll implement copy to the clipboard using few lines of pure javascript code, no jQuery, no flash .

Continue reading...

Simple way to set up your site to have a mobile app

You can easily set up your responsive website to a mobile like app by defining some simple meta tag in your HTML head. Chrome 39 + browser has an option that generates a shortcut of your site to your phone home screen. When you’ll click that shortcut or launch the app

your web app will open in full-screen mode.

There will no address bar,

There will be a splash screen,

There will no traditional browser actions like history or bookmark,

External link will try open an another browser instance like other general mobile app,

Launched from the home screen will appear in the task switcher separate from the browser,

Web apps will launch and stay in the designated orientation

Continue reading...