Only works served with http:// not with file:// due to ajax.