Skip to main content

Test your website in IE using Linux with Vagrant/Virtualbox

I've had an on-off relationship with Vagrant, having first used it for a short while at a previous job. However, in my current employment, we primarily use Linux based laptops, while a select number use Macs. Either way, testing our website developments in Internet Explorer is an added, but necessary headache.

However, Vagrant is actually quite brilliant for not only hosting development environments with ease, but for also hosting flavours of Windows, all with their different combinations of Internet Explorer. I remember back in 2010, using the likes of IETester to install multiple versions of IE within Windows. It was messy and unreliable.

Back to 2016, Vagrant works with Virtualbox to bring you multiple virtual machines that allow you to test your work easily.

I'll skip over installation of Vagrant and Virtualbox. Just visit their respective websites, and install as required.

If you're intention is only to test one version of IE, you could simply visit and download a suitable box to your machine. Or, you could use this gist to grab all of the vms. This link contains a Vagrantfile to save into a given folder on your machine. I've set up a folder called windowsvms, and saved the Vagrantfile there.

I then access my terminal, and cd windowsvms, then type the following:

IE=Win7IE8 vagrant up

Assuming you have a decent internet connection, the box will get downloaded and unpacked to this location. Once everything has completed, Virtualbox will appear to boot your new virtual machine.

By default, you can browse the internet in your guest VM. However, you need to find out how to access your website running on the host. Assuming you have a site running on localhost, on Linux you can use the ifconfig command to get details of your host ip address.

Type ifconfig, and look for the inet addr under usually wlan0 (for wireless connection) – it will look like You can test this by going to your web browser, and replacing 'localhost' part of the address with the ip address. You should still get your website.

Now, check your network connection in the Virtualbox menu. Look under Devices > Network > Network Settings. You should have only one adapter active. If not, then ensure it is enabled and set to NAT, with Cable Connected. Close the window, go to the Start menu, and type cmd, to bring up the command prompt.

We now need to find out the gateway ip address so we can view the website in IE. Type ipconfig, and look up the details for something like Ethernet adapter Local Area Connection 1. Find the IP address under the default gateway, it should resemble or similar. This is the address we need.

Now open IE in your guest VM, and input the following URL:

replace website with whatever your address is, and you should now see your website within IE.

Once you get the hang of it, Vagrant and Virtualbox are an ideal set of tools in your armoury of browser testing.


Popular posts from this blog

Polymer Picker, and why 8-bit programming matters to me

Late last year, I released a BBC Micro game, Polymer Picker . Realising that 2022 marked the centenary of the BBC, as well as the 40th anniversary of the release of the BBC computer (which was designated as one of the BBC's 100 Objects ), I wanted to work on something that related to the BBC's mission of being able to 'educate, inform and entertain' . So what better way than to release a game for the BBC computer, that in a sense, fulfils those values? But, with video games being so widely available, and playable on all kinds of devices, why did I decide to create my own game for such a niche platform?  Video games are big business. They have been for a number of years. In May 2023, it was reported that Nintendo's latest edition of The Legend of Zelda sold in excess of 10 million copies in three days .  However, there remains sustained interest in video games from yesteryear. Children who grew up in the 8-bit computer revolution are now into their 40s and 50s, and

Rough guide to building UK election maps for D3.js

During my time at CITY A.M. I helped to build an interactive British General Election Map . This blog outlines how I created it. Let's see the map then Here's a simplified version of the map, hosted at Codepen. See the Pen D3 Election Map by Stephen Scott ( @sassquad ) on CodePen . Here, the map looks rather small, as it has been resized to fit the page. You can use your mouse wheel (or double-click/double-tap) to zoom in or out of the map, and click constituencies to view more detailed results on the left hand side. Each constituency is coloured according to party livery. This blog post gives a very general guide as to how that map was created. I'll be adding further detail about the creation of the map in subsequent posts. Acknowledgements This project was the work of several people, in addition to myself. Here are the other former colleagues who collectively made the election map possible: Michael King (back end programming of data capture system) Bill

Using Beebasm for BBC Basic games programming (Mac & Windows)

In August 2021, I released Androidz Redux , a remastered version of my 1994 game Androidz . This process started a year ago, with a couple of days spent playing around with the original code, far away from a real BBC computer. The original game was published in a magazine called Acorn Computing, and has been available to play online for a number of years now. Because I wrote the game on an actual BBC Micro, I used what tools I had at the time, namely some graph paper to create the graphics, and the computer itself to do the actual coding. This is a world away from the tools we now have at our disposal. Fully rounded IDE's such as Visual Studio Code (my current favourite) make it an awful lot easier to program games. Even editors such as Notepad++ offers some ability to edit BBC Basic code. One of the difficulties with editing old games on modern systems is ensuring that you are able to ensure that the BASIC code is properly tokenised before running on an emulator/system, and indee