1 00:00:04,980 --> 00:00:06,580 What are cookies? 2 00:00:08,010 --> 00:00:10,390 Hello, everyone, in this picture. 3 00:00:10,410 --> 00:00:16,440 We're going to talk about cookies and also in this section we are going to work with cookies and you 4 00:00:16,440 --> 00:00:19,160 will see how we can create them music by them. 5 00:00:20,340 --> 00:00:24,600 But I first wanted to clarify for you what cookies actually are. 6 00:00:25,110 --> 00:00:26,940 So cookies are usually. 7 00:00:28,270 --> 00:00:34,990 Created by a website and directed the files with very small amount of data, and this small amount of 8 00:00:34,990 --> 00:00:42,250 data is always being transmitted between the sender, which is usually the user and the receiver, which 9 00:00:42,250 --> 00:00:43,030 is the website. 10 00:00:43,660 --> 00:00:50,770 So what you're really doing is they're storing your activity or they're pretty much writing the history 11 00:00:50,770 --> 00:00:54,910 of your activity over a server or over any other service. 12 00:00:55,240 --> 00:01:01,270 So then the service and also is your activity, which pages, for example, you visited when you were 13 00:01:01,270 --> 00:01:10,330 browsing and knowing that information is provided to the server, some additional data in order to personalize 14 00:01:10,510 --> 00:01:12,070 the services that you're seeing. 15 00:01:12,400 --> 00:01:20,950 For example, if you are searching in the past for sports equipment, let's say if you are looking for 16 00:01:20,950 --> 00:01:27,820 football equipment, then all the advertisements that you see online are going to be related to football 17 00:01:27,820 --> 00:01:35,260 equipment because, for example, will go with it will have this cookie that is exchanged with you. 18 00:01:35,620 --> 00:01:40,890 And in there it will be written that you search for football equipment. 19 00:01:41,110 --> 00:01:45,100 So Google will know that you're a person interested in that. 20 00:01:45,340 --> 00:01:50,890 And for that reason, you see the ads and why you see personalized ads. 21 00:01:51,130 --> 00:01:57,970 You just because there was a cookies that are being exchanged between you and Google or another server 22 00:01:57,970 --> 00:01:58,700 or website. 23 00:01:59,200 --> 00:02:06,520 Also, if you are shopping in of the website, this is a way that you will always see your items in 24 00:02:06,520 --> 00:02:09,790 the shopping cart, in the virtual shopping cart of the website. 25 00:02:10,030 --> 00:02:14,890 And the items that you have are usually listed also in the cookies. 26 00:02:15,580 --> 00:02:18,200 So they are usually two types of cookies, guys. 27 00:02:18,520 --> 00:02:27,970 And the first type is the cookies which are opened and they're existing actually only while you're here 28 00:02:27,970 --> 00:02:29,590 having the browser opened. 29 00:02:29,950 --> 00:02:35,920 So once you close the browser Eurocurrency in the browser, then these cookies are demolished and they 30 00:02:35,920 --> 00:02:37,150 are basically deleted. 31 00:02:37,780 --> 00:02:43,720 The other type of cookies are the persistent cookies and they are staying for a longer time and this 32 00:02:43,720 --> 00:02:44,730 time is predefined. 33 00:02:44,740 --> 00:02:47,800 It could be three months, it could be a year and so on. 34 00:02:48,580 --> 00:02:56,370 They or they could be staying there forever and to delete a browser or throw away your computer. 35 00:02:56,830 --> 00:03:02,770 So the persistent cookies are actually the ones that are controlling the ads that you see and the search 36 00:03:02,770 --> 00:03:04,110 results that you get. 37 00:03:04,690 --> 00:03:10,000 Of course, cookies have some quite advanced security options. 38 00:03:10,600 --> 00:03:17,320 So the data that is stored there, which is your data, is sort of vulnerable and it's not sent to any 39 00:03:17,320 --> 00:03:19,430 other companies or users. 40 00:03:19,430 --> 00:03:20,700 So that shouldn't have them. 41 00:03:21,190 --> 00:03:26,950 For example, if you want to if your credit card information on your computer, then you definitely 42 00:03:26,950 --> 00:03:31,360 don't want this to be accessed by anyone else except yourself. 43 00:03:31,810 --> 00:03:37,720 So, for example, for some cookies, they can also store a local token. 44 00:03:37,930 --> 00:03:45,330 And this is specifically a cookie that will remain in your computer or in your account forever. 45 00:03:45,850 --> 00:03:52,300 And this is the way that in the recent years, Google is so good at saving your passwords for different 46 00:03:52,300 --> 00:03:52,810 websites. 47 00:03:53,020 --> 00:04:00,250 And simply by logging into your Google account, you have access to all your website logins simply because 48 00:04:00,250 --> 00:04:06,910 they thought the cookies were bogus, specifically in your Google account, but not on your computer 49 00:04:06,910 --> 00:04:07,510 personally. 50 00:04:07,900 --> 00:04:14,620 So before you think that cookies are a bad thing, they are actually the only way for the server to 51 00:04:14,770 --> 00:04:19,720 track the client and to give the information that the client actually needs. 52 00:04:20,080 --> 00:04:22,270 This is because the HTP. 53 00:04:23,590 --> 00:04:32,800 Protocol does not actually a mechanism that can say, if you want to, searchers are coming from the 54 00:04:32,800 --> 00:04:34,130 same client or not. 55 00:04:34,390 --> 00:04:42,910 So without server being able to uniquely identify what the customer wants, then it would be impossible 56 00:04:42,910 --> 00:04:47,230 to shop online or having saved the password from our computer. 57 00:04:47,710 --> 00:04:49,410 So these are cookies, guys. 58 00:04:49,420 --> 00:04:54,700 I hope you understood them quite good, because in the next lecture, we're actually going to do some 59 00:04:54,700 --> 00:04:56,970 coding with cookies on the web. 60 00:04:56,980 --> 00:04:58,900 And so it will be quite exciting. 61 00:04:59,140 --> 00:05:00,830 But that was it for today. 62 00:05:00,850 --> 00:05:03,780 Thanks very much for watching and I'll see you in the next video.