I was a cook for 5 years but I switched jobs and now I'm a web developer. Should I put this information in my resume along with my experience in tech companies while searching for a job as a web developer?
I suggest that you wrote down your cook experience and emphasize what you learn that you can use in your next position.
We hired some candidates as a Junior Developer in past companies where I work that they were Cook for multiples years. They emphasize in their resume that they learn soft skills like team communication, planning, etc. because they are crucial in kitchen rush moments.
I can feel every day in the development world a backslash when the communication is not adequate on a decision or when a developer decides to go solo on an underestimated task. So I feel those skills are essential for a developer position.
I propose you drop the cook position in your resume when you will acquire more experience in the development field.
Briefly mention that you were a cook but other than that do not go into detail unless you have your resume is looking bare then I suggest you talk about it just to show that you have had a professional career and not a 5 year break.
Otherwise just keep your resume relevant to the jobs you are applying for.
That really depends. Did you just recently change fields? Are you fresh out of college?
A potential employer may want to see the past 10 years of employment experience. If you're 22 and you've been in IT for a few years, it's not a big deal. If you're 32 and you've been a web developer for 2 years, they're going to want to know what you were doing before then. It doesn't have to have a prominent place on the resume, but it's not a bad idea to have a single line saying "Fry Cook, 2012-2017" with the name of the restaurant.
I'd also suggest that even as a guy fresh out of college, five years in a job is an accomplishment. Heck, as an adult, five years in a job demonstrates longevity. It shows a potential employer that you won't jump ship after 6 months for a petty reason.