the solution for html5 webapp