Bits and bytes of code

Bytes is my collection of short-form posts, tips, and things I learn as I build software.

Showing results for #js


I came across the document.designMode property recently, and at first I did not understand why you would ever need it, but today I actually used it and wanted to share my learnings with you!

Using localStorage is great for storing simple user preferences such as the expanded/collapsed state of a sidebar, or the light/dark theme preference for the site. An often overlooked but useful feature of localStorage is the ability to sync changes between open tabs.