$template update & optimize for $browser