Summary
Collecting and defining information about the user’s browser and operating system to streamline design and the code for the rest of the page.
Building the many section of this website, I found myself retrieving the same browser information to determine how the rest of the layout would be like. Importing this site header script allows me to organize and bring consistency to the variables I use for all the sections of the website.
Notes
I wanted to include determining whether the user is viewing the page with a mobile device, but the methods I’ve found out there involved comparing against a list of mobile device brand names, and I didn’t want to do that, for the brand names don’t necessarily mean it’s a mobile device. Also, for now, I wanted to find out if it’s a mobile device only for the sake of styling, and I could already do that with the <link> tag and @media rule.







