Simple implementation for modern browsers