added app-cache code