[Cookies](/glossary/cookie/) and local storage are both mechanisms by which websites can store data on your device. The main difference is that whenever your [browser](/glossary/browser/) requests a webpage from a [server](/glossary/server/), it includes all the cookies that server has previously stored along with the request. It doesn't include anything from local storage. That makes local storage better suited to storing larger amounts of data.