Optimizing function for load header things on views