Thursday, April 14, 2011

Making Cookies

If I said we were talking about cookies in class on Monday you’d probably think I was taking a cooking class in the culinary arts program here at Moraine Park Technical College. But actually the class I have on Monday nights is JavaScript.


JavaScript is a programming language that Web developers use to create more interactivity for the users (people who visit a Website). My instructor likes to explain JavaScript in terms of cooking. Using JavaScript is like adding spices to a Website for flavor. You can cook up a plain HTML page, but it can be bland without things like JavaScript.


In class, we learned how to create an Internet cookie. This kind of non-bakery cookie is something uploaded to a users computer when they visit a site to make it more personalized next time they visit that site. These could be things like preferences or what they had in their shopping cart. The HTML page we coded prompted the user to enter their favorite kind of cookie. By using JavaScript, we were able to take that information and use it in an alert box.


To see if it was saved onto the computer, we checked the browser to see if that information was saved in the cookie folder. It was! Last semester I learned what a cookie was and this semester I’m actually creating them!


After class we were all hungry for cookies - the bakery kind, of course.

No comments:

Post a Comment