LocalStorage gotchas in Internet Explorer and Safari

localStorage.setItem will throw an “Access denied” error in Internet Explorer InPrivate Browsing mode. Likewise, Safari will give you QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota. To avoid those errors, you will need to wrap your localStorage access in a try/catch block.

Using CSS3 transforms and calc() in Internet Explorer

Although CSS calc sizes are supported in Internet Explorer 10 and above, they do not work when used in transform attributes. For instance, transform: translate(0, calc(100% – 10px)); does not work in Internet Explorer. To work around this, you can chain transforms. For instance, the following statements are equivalent: transform: translate(0, calc(100% – 10px)); //Does […]

Using X-UA-Compatible with valid HTML5

If you were using <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /> to force IE to use the most recent rendering engine and disable compatibility mode, you might have discovered that it’s not a valid HTML5 meta tag. The easiest way to solve it is to use .htaccess or your Apache config to always send X-UA-Compatible in the HTTP […]

Fix “Unable to open this Internet site” when downloading files in IE

Have you received the following error while downloading an attachment in Internet Explorer? Unable to download [file] from [domain]. Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. This seemingly random bug is fortunately pretty easy to fix. Nake sure you set the following […]

How to force IE8 to render without compatibility mode

Some companies force Internet Explorer 8 to render all pages using the Internet Explorer 7. This is what Microsoft calls “compatibility mode”. Fortunately, you can override that setting and force IE to render the page using the latest version of its rendering engine (IE8+) with a simple meta tag. Place this before all other tags […]

How to get the textarea’s maxlength attribute to work in Internet Explorer

If you are developing for an older version of Internet Explorer (IE8 and older), you might have noticed that your chronogically-challenged browser does not support the maxlength attribute. Fortunately, you can solve it with a few lines of jQuery: //textarea maxlength support for chronogically-challenged browsers $(‘textarea[maxlength]‘).keyup(function(){ //Get the value var text = $(this).val(); //Get the […]

How to remove the dropdown arrow in Internet Explorer

Unlike other browsers, Internet Explorer will not fully disable a <select> element’s style when you use the CSS3 appearance property. To hide the dropdown’s arrow, use the following CSS line: select::-ms-expand { display: none; }

How to launch the Windows Phone Emulator without Visual Studio

Here’s a simple trick that lets you launch the Windows Phone 8 Emulator without using Visual Studio 2012. It’s quite simple: Open “Command Prompt” in Administrator mode (right click on it on the Start page icon, choose Run as administrator) Launch the emulator using the following command (with quotes): “C:\Program Files (x86)\Microsoft XDE\8.0\xde” -vhd “C:\Program […]

Universal browser quick tips

These little-known tips will make web browsing easier and faster. Have any more to suggest? Leave a comment. Middle-clicking a tab will close it. Middle-clicking a link will open it in a new tab. You can also middle-click the task bar preview in Windows to close the tab or window. Ctrl+Shift+T will open the last […]