Category: Web
-
Even better geolocation than getPosition() with modified watchPosition()
Part of the new geolocation api provides a method to get a user’s current position. In theory that’s awesome, but in practice it was returning inconsistent results. Sometimes it was accurate, other times it was off by miles. If I tried it multiple times in a row it would get more accurate, but only some…
-
Weird characters on my site
Every once in a while I get a submission to Song Key Finder that contains some weird characters (they showed up as boxes). I use the MusicBrainz database api to verify song and artist information, so my first thought was to consult with them. Since the characters appeared to be showing up in non-english songs, I…
-
My experience with Errorception
While attending the JavaScript conference FluentConf last week in San Francisco, I heard a few people talking about a tool called Errorception. They said it offered an easy way to track all the client-side errors your users are experiencing. Since I’m a fan of an error-free website, I decided to give it a try. Signup…
-
Is Qaptcha secure?
We all hate captchas, so when I saw a new captcha alternative called Qaptcha I was slightly intrigued. Instead of typing in mangled words, you simply slide a slider bar to prove you are human. How simple! See the demo here. But the more I looked at it, the more I thought about how it…
-
Does hidden javascript still run?
I was curious if javascript was still executed by the browser even if it was within an element that is hidden in the DOM. A quick search yielded no conclusive evidence, so I decided to test myself. Quick answer: Yes, it does still execute – for both inline and included javascript regardless of how it’s…
-
PHP script stops after it takes a long time to load
If you have a PHP script that may take a long time to process (more than a couple minutes), make sure you’re printing output as it gets generated. If the page takes too long to load then some browsers will close the connection if nothing is being sent to it. All you have to do…
-
Too much spacing in form created for JQuery Mobile
I used the Codiqa Screen Designer on the JQuery Mobile homepage and while at first I was impressed, I noticed quite a bit of extra padding and spacing. I tried to override the CSS, but the best way to get rid of it was to remove all of the fieldcontain and controlgroup divs that it adds in:…
-
Internet Explorer document mode not default on page load
If you ever come across a website that renders as though it’s in IE7, even though it’s IE9 or later, try checking the meta tags. It probably has this set: <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″> This tells the browser to render as though it’s Internet Explorer 7 no matter what the version. If you need to detect whether this is happening…
-
404s when using Google Pagespeed Service
We recently tried Google’s Pagespeed Service to see if it was quicker and easier than using a CDN. Quick answer – it didn’t help us too much. But I did encounter a number of weird 404’s when testing it out that I thought I might document. Before we made any permanent changes we of course…
-
Image is rotated when viewed on mobile phone browser
When developing a mobile app, I noticed that one person’s profile picture was showing up rotated sideways. When I visited this on my computer browser, it appeared fine, but when trying with an iPhone it was always to the side! At first I thought this was a coding problem, but I realized that if I…