VGTech is a blog where the developers and devops of Norways most visited website share code and tricks of the trade… Read more



the

Frontend

category

Hover state on touch devices

Frontend

With an increasing number of users on tablets and smartphones, the need to take touch friendliness into consideration is greater than ever. Even though both the browsers and hardware are approaching desktop speed, there are still some issues with implementing web sites and web apps for these devices. (more…)


Speed up websites using DNS prefetching

Frontend

We recently added a couple of lines of HTML to our mobile website that potentially speeds it up for users with recent browsers (Chrome and Firefox, at the time of writing). The technique might not work for all sites, but it applied very well to ours. I’ll explain how and why (more…)




Safari on iOS 5 Randomly Switches Images

DevOps

Since the release of iOS 5 we’ve received several bug reports about images randomly displaying the wrong image(s) on our front page for smartphones. It seems to be completely random and could affect any of the images, anywhere and anyhow. During one week we would receive anywhere between two and ten reports about this error. In the same time period we would do about 4.5 million page impressions(2.9 million of them from iPhone) on the front alone. (more…)


Speeding up fonts for the web

Frontend

Custom fonts for the web are a bit of a pain. Browsers support different kinds of font formats, they can be relatively heavy and the rendering can vary between operating systems.

Luckily, Google Web Fonts have come along and helped out, providing free and open-source fonts that is easy to implement on any website and should work across browsers. Typekit also provides fonts for the web, although not free.

We were having trouble getting the touch-version of VG’s front page to render correctly on Android – the reason behind this is the use of the “Times New Roman”-font. While Android does have a serif-font (Droid Serif), its metrics are not equal to that of Times New Roman, which results in text breaking at different points compared to the original font we use.
(more…)