{"captions":[{"content":"[Seminar] [Preparing Your Site for the Web]","startTime":0,"duration":2000,"startOfParagraph":false},{"content":"[Yuechen Zhao] [Harvard University]","startTime":2000,"duration":3000,"startOfParagraph":false},{"content":"[This is CS50.] [CS50.TV]","startTime":5000,"duration":2000,"startOfParagraph":false},{"content":"Okay. Here's another hour of web development if you guys are up for it.","startTime":7000,"duration":4660,"startOfParagraph":true},{"content":"Today I'm going to be talking about preparing your site for the Web.","startTime":11660,"duration":4630,"startOfParagraph":false},{"content":"All day--and probably for the past 2 weeks--","startTime":16290,"duration":3970,"startOfParagraph":false},{"content":"we've been talking about how to create a website,","startTime":20260,"duration":1980,"startOfParagraph":false},{"content":"how to use HTML, how to use PHP, how to use frameworks,","startTime":22240,"duration":2640,"startOfParagraph":false},{"content":"how to make sure that you can interact with the database--things like that.","startTime":24880,"duration":4540,"startOfParagraph":false},{"content":"But today, we're going to be talking about where your site's going to live after CS50.","startTime":29420,"duration":5410,"startOfParagraph":false},{"content":"Because after all, CS50 does not happen past December.","startTime":34830,"duration":5180,"startOfParagraph":false},{"content":"We're going to be talking about domain names, hosting.","startTime":40010,"duration":2080,"startOfParagraph":false},{"content":"We're going to be talking about what cross-browser compatibility ","startTime":42090,"duration":2700,"startOfParagraph":false},{"content":"and cross-platform compatibility are, and how you can make sure that your site","startTime":44790,"duration":4750,"startOfParagraph":false},{"content":"is going to operate under all conditions.","startTime":49540,"duration":2070,"startOfParagraph":false},{"content":"We'll talk about error handling and other server magic.","startTime":51610,"duration":2720,"startOfParagraph":false},{"content":"We're talking about performance optimization, search engine optimization,","startTime":54330,"duration":3560,"startOfParagraph":false},{"content":"and how to get people to actually visit your websites.","startTime":57890,"duration":2420,"startOfParagraph":false},{"content":"And finally, just some good resources to make sure that you guys have enough of those","startTime":60310,"duration":5650,"startOfParagraph":false},{"content":"to go off with your final project, and hopefully after.","startTime":65960,"duration":3720,"startOfParagraph":false},{"content":"The first thing that we're going to talk about is domain names.","startTime":69680,"duration":3440,"startOfParagraph":true},{"content":"Right now you're programming in your appliance, you're going to a local host","startTime":73120,"duration":4900,"startOfParagraph":false},{"content":"which isn't actually a domain name.","startTime":78020,"duration":2340,"startOfParagraph":false},{"content":"That's sort of just a nickname or an alias for your actual Linux installation","startTime":80360,"duration":6010,"startOfParagraph":false},{"content":"inside of either VMware on a Mac or VMware Player on a PC.","startTime":86370,"duration":4780,"startOfParagraph":false},{"content":"Domain names allow you to put a site onto the Web and then go to something like","startTime":91150,"duration":5360,"startOfParagraph":false},{"content":"www.google.com and get the website.","startTime":96510,"duration":2890,"startOfParagraph":false},{"content":"How do they work?","startTime":99400,"duration":2100,"startOfParagraph":false},{"content":"Let's say that you're just an average web server--","startTime":101500,"duration":1890,"startOfParagraph":false},{"content":"average Web surfer and you have a laptop, and you go to www.howstuffworks.com.","startTime":103390,"duration":6690,"startOfParagraph":false},{"content":"You can probably see where I stole this from.","startTime":110080,"duration":2490,"startOfParagraph":false},{"content":"How stuff works--your computer will then ask a local DNS server, ","startTime":112570,"duration":4730,"startOfParagraph":false},{"content":"\"Do you know where this website is?\"","startTime":117300,"duration":2000,"startOfParagraph":false},{"content":"\"Do you know the IP address of www.howstuffworks.com?\"","startTime":119300,"duration":2900,"startOfParagraph":false},{"content":"Your DNS server might say, \"Yes, I do.\"","startTime":122200,"duration":3380,"startOfParagraph":false},{"content":"In that case, you get the IP address, and your computer accesses that IP address.","startTime":125580,"duration":3559,"startOfParagraph":false},{"content":"If it does not, it asks another DNS server, \"Hey! Do you know what www.howstuffworks.com is?\"","startTime":129139,"duration":5911,"startOfParagraph":false},{"content":"That server might say, \"Yes, I do.\"","startTime":135050,"duration":2620,"startOfParagraph":false},{"content":"So, it tells the other one what it is, and finally, that information gets passed to your computer,","startTime":137670,"duration":4830,"startOfParagraph":false},{"content":"and you can access howstuffworks.com.","startTime":142500,"duration":2180,"startOfParagraph":false},{"content":"How can you get one of these magical things?","startTime":144680,"duration":2860,"startOfParagraph":true},{"content":"How can you get maybe www.yourname.com or www.ilovecats.com?","startTime":147540,"duration":5400,"startOfParagraph":false},{"content":"You can register for one,","startTime":152940,"duration":2410,"startOfParagraph":false},{"content":"and there are a lot of websites out there that allow you to do so.","startTime":155350,"duration":2930,"startOfParagraph":false},{"content":"You must--in most circumstances you must pay for them.","startTime":158280,"duration":3140,"startOfParagraph":false},{"content":"There are certain domain names that are free.","startTime":161420,"duration":2470,"startOfParagraph":false},{"content":"If you go to www.co.cc or .tkdomainnames, those are free.","startTime":163890,"duration":7010,"startOfParagraph":false},{"content":"But, they do come with certain restrictions, and in fact some of them might not even be","startTime":170900,"duration":5600,"startOfParagraph":false},{"content":"real, top-level domain names like .com or .net.","startTime":176500,"duration":4040,"startOfParagraph":false},{"content":"Normally I would suggest going for one of them ","startTime":180540,"duration":2760,"startOfParagraph":false},{"content":"because users are just more comfortable with those.","startTime":183300,"duration":3760,"startOfParagraph":false},{"content":"You've seen a lot of .coms. You've seen a lot of .nets.","startTime":187060,"duration":3010,"startOfParagraph":false},{"content":"You probably haven't seen a lot of .co.cc's, so they're harder to remember.","startTime":190070,"duration":3720,"startOfParagraph":false},{"content":"Different websites like Godaddy or NameCheap or--I used one that's","startTime":193790,"duration":5110,"startOfParagraph":false},{"content":"kind of sketchy--called activedomain.com.","startTime":198900,"duration":2650,"startOfParagraph":false},{"content":"It looks really sketchy, but it's worked really well for me.","startTime":201550,"duration":2610,"startOfParagraph":false},{"content":"And finally, you have others that maybe do more advertising like Network Solutions.","startTime":204160,"duration":3650,"startOfParagraph":true},{"content":"But if you go onto NetworkSolutions.com and look at their pricing","startTime":207810,"duration":3330,"startOfParagraph":false},{"content":"it is really expensive. I was looking at them last night.","startTime":211140,"duration":2930,"startOfParagraph":false},{"content":"For one year of a domain name, it's probably not worth that much money.","startTime":214070,"duration":3330,"startOfParagraph":false},{"content":"In fact, if you're getting a .com or a .org or a .net","startTime":217400,"duration":2810,"startOfParagraph":false},{"content":"the usual price is about $10 a year.","startTime":220210,"duration":3220,"startOfParagraph":false},{"content":"So if you're paying a lot more than that, it's probably not that worth it","startTime":223430,"duration":5280,"startOfParagraph":false},{"content":"because, after all, these websites don't do anything with that domain name.","startTime":228710,"duration":3730,"startOfParagraph":false},{"content":"They just give it to you, and so if you can get it for cheap, why not?","startTime":232440,"duration":5830,"startOfParagraph":false},{"content":"The other thing is once you have your domain name, then you probably want to ","startTime":238270,"duration":4270,"startOfParagraph":true},{"content":"go on to either Godaddy.com or wherever you bought your domain name","startTime":242540,"duration":6070,"startOfParagraph":false},{"content":"and set the name servers for that domain name.","startTime":248610,"duration":2610,"startOfParagraph":false},{"content":"What that means is once a user goes to www.howstuffworks.com,","startTime":251220,"duration":4340,"startOfParagraph":false},{"content":"those name server IP addresses are the IP addresses that they would be able to look up.","startTime":255560,"duration":5279,"startOfParagraph":false},{"content":"They would be able to access your website through those name servers.","startTime":260839,"duration":3841,"startOfParagraph":false},{"content":"If you apply for hosting somewhere","startTime":264680,"duration":2150,"startOfParagraph":false},{"content":"then your host will most likely give you the name servers to use.","startTime":266830,"duration":4380,"startOfParagraph":false},{"content":"And finally, there's this thing called a WHOIS.","startTime":271210,"duration":3000,"startOfParagraph":true},{"content":"A WHOIS database is a database with which you could input a domain name","startTime":274210,"duration":4680,"startOfParagraph":false},{"content":"and it will spit out some information about the owner of that site and other contact information.","startTime":278890,"duration":5280,"startOfParagraph":false},{"content":"Now, you may say, \"I don't really want my home address or I don't really want my email address","startTime":284170,"duration":4910,"startOfParagraph":false},{"content":"on the website for anyone to see or on the Internet for everyone to see.\"","startTime":289080,"duration":4930,"startOfParagraph":false},{"content":"Then you might want to use something that a lot of hosting services provide--","startTime":294010,"duration":3730,"startOfParagraph":false},{"content":"like a WHOIS manager.","startTime":297740,"duration":2000,"startOfParagraph":false},{"content":"A WHOIS manager is simply another service that a lot of them provide that","startTime":299740,"duration":3810,"startOfParagraph":false},{"content":"hides away that information and just puts in who is manager for the name--","startTime":303550,"duration":4150,"startOfParagraph":false},{"content":"for the address it's usually just that company name that's given you this domain name--","startTime":307700,"duration":5370,"startOfParagraph":false},{"content":"and so then your personal information isn't being leaked on the Internet,","startTime":313070,"duration":4280,"startOfParagraph":false},{"content":"which is usually pretty good.","startTime":317350,"duration":2000,"startOfParagraph":false},{"content":"I myself use one of these services.","startTime":319350,"duration":2000,"startOfParagraph":false},{"content":"If you don't care about your own privacy then it doesn't really matter.","startTime":321350,"duration":4280,"startOfParagraph":false},{"content":"A DNS server stands for Domain Name System, and what it is--","startTime":325630,"duration":6860,"startOfParagraph":true},{"content":"it's sort of like a hash table somewhere that says,","startTime":332490,"duration":4070,"startOfParagraph":false},{"content":" \"This website address is going to map to this IP address.\" And that's all it is. ","startTime":336560,"duration":5760,"startOfParagraph":false},{"content":"So once you query this DNS server, then you can get the IP addresses","startTime":342320,"duration":5860,"startOfParagraph":false},{"content":"for that corresponding domain name and then visit that website.","startTime":348180,"duration":3750,"startOfParagraph":false},{"content":"(audience member asking a question--inaudible)","startTime":351930,"duration":7890,"startOfParagraph":false},{"content":"The first? The first level actually is usually just your computer cache itself.","startTime":359820,"duration":8090,"startOfParagraph":false},{"content":"Your computer sort of remembers the last time that you went to www.google.com","startTime":367910,"duration":4660,"startOfParagraph":false},{"content":"it was at this IP address, and then after awhile, that cache will expire,","startTime":372570,"duration":5520,"startOfParagraph":false},{"content":"and it will ask like the Comcast DNS,","startTime":378090,"duration":5470,"startOfParagraph":false},{"content":"\"Hey, what's www.google.com?\"","startTime":383560,"duration":2840,"startOfParagraph":false},{"content":"Normally, when you buy a domain name and you register one, and you set up a website,","startTime":386400,"duration":4640,"startOfParagraph":false},{"content":"you can't go to that website immediately with that domain name because the name servers","startTime":391040,"duration":4630,"startOfParagraph":false},{"content":"across the globe don't know about your domain name yet. It has to populate.","startTime":395670,"duration":4510,"startOfParagraph":false},{"content":"It usually takes about 24-48 hours.","startTime":400180,"duration":3040,"startOfParagraph":false},{"content":"All right. So, that's a little bit about domain names. They're very cool.","startTime":403220,"duration":5240,"startOfParagraph":false},{"content":"I think you should get one if you're serious about the project ","startTime":408460,"duration":3080,"startOfParagraph":false},{"content":"and if you really want to make your project known across campus,","startTime":411540,"duration":3760,"startOfParagraph":false},{"content":"having a domain name makes it look really professional.","startTime":415300,"duration":2750,"startOfParagraph":false},{"content":"Then the next step, of course, is to have some sort of hosting.","startTime":418050,"duration":3460,"startOfParagraph":true},{"content":"If you just host it on your computer, nobody's ever going to be able to go to it.","startTime":421510,"duration":4030,"startOfParagraph":false},{"content":"You could potentially set up a server on your computer and keep your computer on forever,","startTime":425540,"duration":3570,"startOfParagraph":false},{"content":"but that's not recommended.","startTime":429110,"duration":2050,"startOfParagraph":false},{"content":"There are different kinds of hosting online available.","startTime":431160,"duration":2840,"startOfParagraph":false},{"content":"There's shared hosting. There's VPN (unintelligible) which are virtual hosts.","startTime":434000,"duration":7870,"startOfParagraph":false},{"content":"There's semi-dedicated and dedicated.","startTime":441870,"duration":2000,"startOfParagraph":false},{"content":"Of the last 3, VPN, semi-dedicated, and dedicated are usually more expensive.","startTime":443870,"duration":5160,"startOfParagraph":false},{"content":"They're usually used for websites that require more resources.","startTime":449030,"duration":3630,"startOfParagraph":false},{"content":"If you're just starting out with a website,","startTime":452660,"duration":2020,"startOfParagraph":false},{"content":"it might just be more economical to go with the shared hosting.","startTime":454680,"duration":5990,"startOfParagraph":false},{"content":"And what shared means is just a bunch of websites are all together","startTime":460670,"duration":2760,"startOfParagraph":false},{"content":"sort of on one server on this website on this host server, and you can access your website","startTime":463430,"duration":8130,"startOfParagraph":false},{"content":"via domain name.","startTime":471560,"duration":2100,"startOfParagraph":false},{"content":"There are a lot of popular hosts out there.","startTime":473660,"duration":2320,"startOfParagraph":true},{"content":"HostGator and DreamHost--those are very, very big and very, very popular","startTime":475980,"duration":5180,"startOfParagraph":false},{"content":"and very, very successful.","startTime":481160,"duration":2000,"startOfParagraph":false},{"content":"I personally use one called MDDHosting.","startTime":483160,"duration":2000,"startOfParagraph":false},{"content":"If you go to www.mddhosting.com, that's my host of choice.","startTime":485160,"duration":3080,"startOfParagraph":false},{"content":"I think they're very good. ","startTime":488240,"duration":2000,"startOfParagraph":false},{"content":"They've always been very reliable, and I've never had any problems with them.","startTime":490240,"duration":4310,"startOfParagraph":false},{"content":"They also have very competitive pricing.","startTime":494550,"duration":4060,"startOfParagraph":false},{"content":"Two that I don't really like are GoDaddy--that's also a very popular host,","startTime":498610,"duration":5790,"startOfParagraph":false},{"content":"but I've had terrible experiences with them, ","startTime":504400,"duration":2000,"startOfParagraph":false},{"content":"and a lot of people that I know have had really terrible experiences with them.","startTime":506400,"duration":3030,"startOfParagraph":false},{"content":"They sort of go after people who don't know what they're doing--","startTime":509430,"duration":2720,"startOfParagraph":false},{"content":"maybe you're making a website for the first time, ","startTime":512150,"duration":2000,"startOfParagraph":false},{"content":"and so they sort of con them into buying their hosting package.","startTime":514150,"duration":3000,"startOfParagraph":false},{"content":"Don't do it. Don't fall for it. Go look for other hosting packages that really fit your needs.","startTime":517150,"duration":5420,"startOfParagraph":false},{"content":"And the other one is--there are free hosts out there.","startTime":522570,"duration":2310,"startOfParagraph":false},{"content":"There are websites that will host your website for free--","startTime":524880,"duration":2470,"startOfParagraph":false},{"content":"sometimes by putting an ad on your site, ","startTime":527350,"duration":2000,"startOfParagraph":false},{"content":"sometimes by making you participate in their forums,","startTime":529350,"duration":2940,"startOfParagraph":false},{"content":"but sometimes just also for free.","startTime":532290,"duration":2050,"startOfParagraph":false},{"content":"But, be careful with free hosts because a lot of them really just go out of business ","startTime":534340,"duration":5660,"startOfParagraph":false},{"content":"after a few months. You just can't keep up with the costs.","startTime":540000,"duration":3480,"startOfParagraph":false},{"content":"Others are just very unreliable, and your site will always be down, ","startTime":543480,"duration":3980,"startOfParagraph":false},{"content":"and you don't want that to happen.","startTime":547460,"duration":2240,"startOfParagraph":false},{"content":"Each host will offer their own control panel.","startTime":549700,"duration":2630,"startOfParagraph":true},{"content":"Notice that for your appliance, there really isn't a control panel per se.","startTime":552330,"duration":4190,"startOfParagraph":false},{"content":"You have to use terminal to go and edit the files.","startTime":556520,"duration":2710,"startOfParagraph":false},{"content":"You have to chmod things by yourself.","startTime":559230,"duration":2000,"startOfParagraph":false},{"content":"If you wanted to go to PHPMyAdmin, ","startTime":561230,"duration":3540,"startOfParagraph":false},{"content":"you have to go to localhost@/phpmyadmin and things like that.","startTime":564770,"duration":4790,"startOfParagraph":false},{"content":"But with a control panel you can go in and edit the files on your server ","startTime":569560,"duration":7100,"startOfParagraph":false},{"content":"with Windows Explorer or a finder-type application.","startTime":576660,"duration":3690,"startOfParagraph":false},{"content":"Or you can go through and look at your databases with their own tool","startTime":580350,"duration":4460,"startOfParagraph":false},{"content":"instead of PHPmyadmin.","startTime":584810,"duration":2470,"startOfParagraph":false},{"content":"So, there is a lot of choice here, and some of the more popular control panels are up there.","startTime":587280,"duration":4960,"startOfParagraph":false},{"content":"But if you are looking for a host,","startTime":592240,"duration":2000,"startOfParagraph":false},{"content":"then you might want to look at what sorts of customizations and options","startTime":594240,"duration":2850,"startOfParagraph":false},{"content":"they offer me to customize my server and to make my website run better.","startTime":597090,"duration":5720,"startOfParagraph":false},{"content":"So, then you might ask, \"Well, how do I choose hosting?\"","startTime":602810,"duration":4300,"startOfParagraph":false},{"content":"If you go on to any host website there's a lot of jargon, and there are a lot of options.","startTime":607110,"duration":4350,"startOfParagraph":false},{"content":"There are a lot of different prices also.","startTime":611460,"duration":3010,"startOfParagraph":false},{"content":"Normally I go for the cheaper ones just because websites that maybe you and I make--","startTime":614470,"duration":5220,"startOfParagraph":false},{"content":"and especially right now, especially as starters--they may not need as many resources","startTime":619690,"duration":3830,"startOfParagraph":false},{"content":"as might a website like Microsoft.com.","startTime":623520,"duration":3250,"startOfParagraph":false},{"content":"First you want to look at the operating system if you're really curious whether","startTime":626770,"duration":5320,"startOfParagraph":true},{"content":"your site's going to be hosted on Linux, on Windows, or on Mac.","startTime":632090,"duration":3000,"startOfParagraph":false},{"content":"Normally we just go with Linux because that's usually the cheapest,","startTime":635090,"duration":4700,"startOfParagraph":false},{"content":"and also the one that maybe you guys are more familiar with because of the appliance.","startTime":639790,"duration":3940,"startOfParagraph":false},{"content":"And then, maybe they'll put some restrictions on the amount of bandwidth that you get--","startTime":643730,"duration":4310,"startOfParagraph":false},{"content":"like how many megabytes or gigabytes of data can users download ","startTime":648040,"duration":4990,"startOfParagraph":false},{"content":"from your website per month? Or disk space.","startTime":653030,"duration":2440,"startOfParagraph":false},{"content":"How much space do you get? Is it 500 MB? Is it 2 GB? Is it unlimited?","startTime":655470,"duration":5170,"startOfParagraph":false},{"content":"Nowadays, a lot of web servers give you unlimited disk space as a way for them ","startTime":660640,"duration":5280,"startOfParagraph":false},{"content":"to entice you to get their hosting package.","startTime":665920,"duration":2640,"startOfParagraph":false},{"content":"But if you really think about it, when are you ever going to need unlimited disk space?","startTime":668560,"duration":3290,"startOfParagraph":false},{"content":"If you have a couple of HTML files, a couple of PHP, a couple of images--","startTime":671850,"duration":6210,"startOfParagraph":false},{"content":"that's only a couple of megabytes, and so","startTime":678060,"duration":2000,"startOfParagraph":false},{"content":"usually I just go for maybe a few gigabytes' worth of space, ","startTime":680060,"duration":3050,"startOfParagraph":false},{"content":"and that might be enough to start me off until I need more.","startTime":683110,"duration":4880,"startOfParagraph":false},{"content":"Finally, they may put restrictions on what sort of--how many databases you can have.","startTime":687990,"duration":3490,"startOfParagraph":true},{"content":"Maybe you can only have 1 database. Maybe you can have 2. Maybe you can have 10.","startTime":691480,"duration":3280,"startOfParagraph":false},{"content":"Is it really important to you how many you get?","startTime":694760,"duration":3570,"startOfParagraph":false},{"content":"Things to ask yourself.","startTime":698330,"duration":2000,"startOfParagraph":false},{"content":"And then finally, just things like languages.","startTime":700330,"duration":2000,"startOfParagraph":false},{"content":"Do they support PHP? Do they support MySQL?","startTime":702330,"duration":2000,"startOfParagraph":false},{"content":"Most hosting websites do support these because they are free. They're open source.","startTime":704330,"duration":4680,"startOfParagraph":false},{"content":"It doesn't cost them anything to provide these for you.","startTime":709010,"duration":2180,"startOfParagraph":false},{"content":"But if you want to use, say, Ruby or Python or some of these other languages--","startTime":711190,"duration":4490,"startOfParagraph":false},{"content":"they may not support it on their server, so it's important to look for those kinds of things.","startTime":715680,"duration":3810,"startOfParagraph":false},{"content":"And finally, do they allow you to do some more advanced things like SSL or cron jobs?","startTime":719490,"duration":6130,"startOfParagraph":true},{"content":"SSL is an option where you can make your website more secure by making it HTTPS","startTime":725620,"duration":6440,"startOfParagraph":false},{"content":"and encrypt your connections.","startTime":732060,"duration":2000,"startOfParagraph":false},{"content":"And cron jobs are just maybe scripts that you want to run ","startTime":734060,"duration":3170,"startOfParagraph":false},{"content":"every 5 minutes, every 10 minutes, every 15.","startTime":737230,"duration":2280,"startOfParagraph":false},{"content":"A lot of shared hosting websites do put restrictions ","startTime":739510,"duration":2520,"startOfParagraph":false},{"content":"on the number of cron jobs that you can run because that takes up more resources.","startTime":742030,"duration":4280,"startOfParagraph":false},{"content":"And finally, just everything else that you want to look at--make sure exactly what's going on","startTime":746310,"duration":5490,"startOfParagraph":true},{"content":"before you buy your hosting package.","startTime":751800,"duration":3380,"startOfParagraph":false},{"content":"And finally, performance. Performance is huge.","startTime":755180,"duration":2540,"startOfParagraph":false},{"content":"How fast is my website going to run?","startTime":757720,"duration":2020,"startOfParagraph":false},{"content":"Most users aren't going to wait for even seconds for your website to run ","startTime":759740,"duration":3210,"startOfParagraph":false},{"content":"before they just get bored, and they go on to MeanBase and start looking at pictures","startTime":762950,"duration":4690,"startOfParagraph":false},{"content":"of cats--you know that happens, and you want to make sure that you get that user on board","startTime":767640,"duration":4600,"startOfParagraph":false},{"content":"and that you have good uptime which just means that","startTime":772240,"duration":2060,"startOfParagraph":false},{"content":"your website's going to be accessible at all times.","startTime":774300,"duration":2000,"startOfParagraph":false},{"content":"A lot of hosts have really bad uptime and that just means your website's not going to be","startTime":776300,"duration":5580,"startOfParagraph":false},{"content":"accessible, and you don't want that to happen because you might be sad.","startTime":781880,"duration":4620,"startOfParagraph":false},{"content":"And you can also track your host's performance with websites like","startTime":786500,"duration":3860,"startOfParagraph":false},{"content":"Pingdom.com or Host-tracker.com, and they just tell you how often is your site down.","startTime":790360,"duration":6080,"startOfParagraph":false},{"content":"And finally, you want to see about their support.","startTime":796440,"duration":2050,"startOfParagraph":true},{"content":"If you have a problem are they going to respond to you within 24 hours?","startTime":798490,"duration":3400,"startOfParagraph":false},{"content":"Are they going to respond to you within 48 hours?","startTime":801890,"duration":2000,"startOfParagraph":false},{"content":"The hosting service that I use normally responds to me within minutes ","startTime":803890,"duration":2610,"startOfParagraph":false},{"content":"which is really nice.","startTime":806500,"duration":3260,"startOfParagraph":false},{"content":"Whew! All right! It's time for a break. But I'm not going to give it to you.","startTime":809760,"duration":4230,"startOfParagraph":false},{"content":"We'll just look at pictures of cute cats every now and then.","startTime":813990,"duration":4210,"startOfParagraph":false},{"content":"Another really, really big thing is cross-browser compatibility.","startTime":818200,"duration":4540,"startOfParagraph":true},{"content":"What do I mean by cross-browser compatibility?","startTime":822740,"duration":3150,"startOfParagraph":false},{"content":"You know, nowadays it's not just Microsoft Internet Explorer.","startTime":825890,"duration":5080,"startOfParagraph":false},{"content":"It's not just Mozilla Firefox or Safari.","startTime":830970,"duration":3000,"startOfParagraph":false},{"content":"Now we have Chrome. We have Opera. We have Dolphin. We have Camino. ","startTime":833970,"duration":4220,"startOfParagraph":false},{"content":"We have Conqueror. We have all of these different browsers.","startTime":838190,"duration":2350,"startOfParagraph":false},{"content":"Things that are coming out now--RockMelt--though those are all based on Chromium.","startTime":840540,"duration":5410,"startOfParagraph":false},{"content":"But the fact of the matter is, there isn't just one browser anymore.","startTime":845950,"duration":5040,"startOfParagraph":false},{"content":"You're not just viewing these webpages with one application.","startTime":850990,"duration":2870,"startOfParagraph":false},{"content":"And so, different browsers will respond to different HTML, different CSS, and","startTime":853860,"duration":3800,"startOfParagraph":false},{"content":"different JavaScript differently, and how do you deal with that?","startTime":857660,"duration":3550,"startOfParagraph":false},{"content":"Well, in certain cases, you really can't.","startTime":861210,"duration":3160,"startOfParagraph":false},{"content":"Your website--if it works in one browser, the code that you wrote will not work","startTime":864370,"duration":4790,"startOfParagraph":false},{"content":"in another browser, and it's your job to make sure that the code that you write","startTime":869290,"duration":3620,"startOfParagraph":false},{"content":"is universal, that it works everywhere.","startTime":872910,"duration":3090,"startOfParagraph":false},{"content":"So, this is really dangerous.","startTime":876000,"duration":2000,"startOfParagraph":false},{"content":"If you say, \"Well, it's working on my computer. Great! Let's move on.\"","startTime":878000,"duration":4450,"startOfParagraph":false},{"content":"Well, it's probably not going to work on mine, and when I go to your website","startTime":882450,"duration":3590,"startOfParagraph":false},{"content":"I'm going to be very sad, and I'm going to leave right away.","startTime":886040,"duration":3170,"startOfParagraph":false},{"content":"So, let's see how you can prevent this.","startTime":889210,"duration":2360,"startOfParagraph":false},{"content":"The first thing, of course, is to only use standard HTML, CSS, and JavaScript.","startTime":891570,"duration":3950,"startOfParagraph":true},{"content":"What do I mean by that?","startTime":895520,"duration":2000,"startOfParagraph":false},{"content":"Well, there are a lot of not standard things out there.","startTime":897520,"duration":2660,"startOfParagraph":false},{"content":"For example, in CSS there are many versions.","startTime":900180,"duration":3310,"startOfParagraph":false},{"content":"If you see any CSS rules with -moz- or -webkit-, those rules are specific ","startTime":903490,"duration":7340,"startOfParagraph":false},{"content":"to both the Mozilla browsers and the Webkit browsers,","startTime":910830,"duration":4890,"startOfParagraph":false},{"content":"and so you want to make sure that maybe you want to avoid those things","startTime":915720,"duration":4870,"startOfParagraph":false},{"content":"because if you use -moz- that rule is only going to work on Firefox.","startTime":920590,"duration":4560,"startOfParagraph":false},{"content":"And if you really want it to look good on Internet Explorer also,","startTime":925150,"duration":4490,"startOfParagraph":false},{"content":"you're going to be out of luck.","startTime":929640,"duration":2000,"startOfParagraph":false},{"content":"For HTML also, you could do things in HTML that work in one browser","startTime":931640,"duration":6270,"startOfParagraph":false},{"content":"but that breaks in another, and you want to avoid that as much as possible.","startTime":937910,"duration":3920,"startOfParagraph":false},{"content":"And finally for JavaScript even--there are many versions of JavaScript, ","startTime":941830,"duration":3000,"startOfParagraph":false},{"content":"and this summer we ran into a problem where Document.getElementsByClassName--","startTime":944830,"duration":5740,"startOfParagraph":false},{"content":"which is usually a function that's defined as a part of the JavaScript standard--","startTime":950570,"duration":3930,"startOfParagraph":false},{"content":"was not to find in Internet Explorer 8.","startTime":954500,"duration":3620,"startOfParagraph":false},{"content":"So, over the summer I was working in a lab and we were building online experiments.","startTime":958120,"duration":3780,"startOfParagraph":false},{"content":"And we thought it was working really well until we realized users that were using","startTime":961900,"duration":4310,"startOfParagraph":false},{"content":"Internet Explorer 8 could not submit their results.","startTime":966210,"duration":3570,"startOfParagraph":false},{"content":"We were missing out on a lot of data. That made us really sad. ","startTime":969780,"duration":3420,"startOfParagraph":false},{"content":"So, you always want to make sure that your scripts are going to work everywhere.","startTime":973200,"duration":4590,"startOfParagraph":false},{"content":"And finally, use validator.w3.org","startTime":977790,"duration":2710,"startOfParagraph":true},{"content":"which is what we tell you to do in pset 7.","startTime":980500,"duration":2270,"startOfParagraph":false},{"content":"Make sure that your pages are validated. ","startTime":982770,"duration":1760,"startOfParagraph":false},{"content":"That's important because that at least is a first step sanity check.","startTime":984530,"duration":3780,"startOfParagraph":false},{"content":"Is my code actually standards compliant?","startTime":988310,"duration":3560,"startOfParagraph":false},{"content":"Another way to sort of help you make sure that your site is going to work","startTime":994930,"duration":4390,"startOfParagraph":false},{"content":"under most circumstances is to maybe use some libraries and frameworks","startTime":999320,"duration":3290,"startOfParagraph":false},{"content":"because these really smart developers have thought about these issues for you.","startTime":1002610,"duration":3600,"startOfParagraph":false},{"content":"They've gone through and they've written different functions that work across browsers.","startTime":1006210,"duration":3640,"startOfParagraph":false},{"content":"For example, we use jQuery in Pset 7.","startTime":1009850,"duration":3710,"startOfParagraph":false},{"content":"Even though you may not have seen it, jQuery provides a lot of functions","startTime":1013560,"duration":4470,"startOfParagraph":false},{"content":"that otherwise you would have to write yourself.","startTime":1018030,"duration":2250,"startOfParagraph":false},{"content":"But these developers wrote it, and they made sure that it works across all browsers.","startTime":1020280,"duration":5030,"startOfParagraph":false},{"content":"And Bootstrap--which is another CSS framework that we showed you in Pset 7--","startTime":1025310,"duration":4970,"startOfParagraph":false},{"content":"it really takes away a lot of the headaches with designing websites that look good.","startTime":1030280,"duration":6720,"startOfParagraph":false},{"content":"in all browsers.","startTime":1037000,"duration":2000,"startOfParagraph":false},{"content":"And finally, if you can avoid it, I usually avoid coding from scratch.","startTime":1039000,"duration":4660,"startOfParagraph":true},{"content":"If you're just creating a website for your school club, for example,","startTime":1043660,"duration":4419,"startOfParagraph":false},{"content":"and all you need to do is to display a few pages and maybe have your president go in","startTime":1048079,"duration":5841,"startOfParagraph":false},{"content":"and change a few things here and there--there's really no need to code that up yourself.","startTime":1053920,"duration":4990,"startOfParagraph":false},{"content":"That takes a lot of your time. ","startTime":1058910,"duration":2000,"startOfParagraph":false},{"content":"It takes a lot of your energy, and you have to go through and you have to find out, ","startTime":1060910,"duration":1750,"startOfParagraph":false},{"content":"well, is this going to look good in this browser, is it going to look good in this browser.","startTime":1062660,"duration":3270,"startOfParagraph":false},{"content":"Maybe use some of these patches that others have already written for you, like","startTime":1065930,"duration":4680,"startOfParagraph":false},{"content":"WordPress or Joomla or Drupal.","startTime":1070610,"duration":2000,"startOfParagraph":false},{"content":"These are called content--these are called CMSs which basically are just packages that","startTime":1072610,"duration":6790,"startOfParagraph":false},{"content":"already come done for you, and you can download them, put them onto your server,","startTime":1079400,"duration":3620,"startOfParagraph":false},{"content":"and customize them however you want, and you already have a running website.","startTime":1083020,"duration":4490,"startOfParagraph":false},{"content":"Those code packages are something to look in to.","startTime":1087510,"duration":4170,"startOfParagraph":false},{"content":"These things are open source unless you go for something like--","startTime":1091680,"duration":3720,"startOfParagraph":false},{"content":"if you're looking for a form package, there are things that are not free like","startTime":1095400,"duration":3990,"startOfParagraph":false},{"content":"VBulletin or IP.Board.","startTime":1099390,"duration":2180,"startOfParagraph":false},{"content":"If you don't need some of those advanced features,","startTime":1101570,"duration":2220,"startOfParagraph":false},{"content":"you can always opt for the free option.","startTime":1103790,"duration":3740,"startOfParagraph":false},{"content":"And finally, there is no avoiding it.","startTime":1107530,"duration":3770,"startOfParagraph":true},{"content":"You must test, test, test. ","startTime":1111300,"duration":2000,"startOfParagraph":false},{"content":"You must test your code on all of these browsers and on all of these platforms.","startTime":1113300,"duration":4390,"startOfParagraph":false},{"content":"And you know, IE6--thank goodness people have started moving away from IE6","startTime":1117690,"duration":6420,"startOfParagraph":false},{"content":"because back in the day, maybe a few years ago, web developers had to always, always,","startTime":1124110,"duration":5080,"startOfParagraph":false},{"content":"always pander to IE6's weaknesses in following the standards.","startTime":1129190,"duration":6090,"startOfParagraph":false},{"content":"Websites just looked kind of 1990's for lack of a better way to deal with it.","startTime":1135280,"duration":5580,"startOfParagraph":false},{"content":"You can also use browser screenshots to check your CSS.","startTime":1140860,"duration":3520,"startOfParagraph":false},{"content":"One really cool website is browserlab.adobe.com.","startTime":1144380,"duration":3720,"startOfParagraph":false},{"content":"This is a complimentary service put out by Adobe.","startTime":1148100,"duration":2970,"startOfParagraph":false},{"content":"And what they do is they can take screenshots of your website","startTime":1151070,"duration":4090,"startOfParagraph":false},{"content":"running under different conditions--like running under different browsers,","startTime":1155160,"duration":3730,"startOfParagraph":false},{"content":"running under different platforms--and show you what they look like.","startTime":1158890,"duration":3770,"startOfParagraph":false},{"content":"Just to show you what I mean here, I created a website last year called Life At Harvard,","startTime":1162660,"duration":10600,"startOfParagraph":false},{"content":"and what I tried to do--I tried to make my.harvard better.","startTime":1173260,"duration":5890,"startOfParagraph":false},{"content":"Because if you were here last year, my.harvard did not look as it looks now.","startTime":1179150,"duration":4690,"startOfParagraph":false},{"content":"It looks kind of disgusting.","startTime":1183840,"duration":2800,"startOfParagraph":false},{"content":"But now it looks a lot better.","startTime":1186640,"duration":3830,"startOfParagraph":false},{"content":"My implementation wasn't that useful anymore, but all the same,","startTime":1190470,"duration":6600,"startOfParagraph":false},{"content":"you know, I tried to add--(unintelligible) many whatever--","startTime":1197070,"duration":4240,"startOfParagraph":false},{"content":"and it looks--it looks very good on my computer.","startTime":1201310,"duration":3370,"startOfParagraph":false},{"content":"And then, maybe if I'd had more time I would have gone on to browser lab,","startTime":1204680,"duration":3880,"startOfParagraph":false},{"content":"and I would have looked at, well, how does it look in Chrome 18 on Windows.","startTime":1208560,"duration":4460,"startOfParagraph":false},{"content":"I would scroll down and I would see--oh no! Look at the announcements box.","startTime":1213020,"duration":4040,"startOfParagraph":false},{"content":"My text was overflowing. So, that's bad, right?","startTime":1217060,"duration":3140,"startOfParagraph":false},{"content":"If a user is using Chrome on Windows and comes to my website,","startTime":1220200,"duration":3500,"startOfParagraph":false},{"content":"that immediately looks very unprofessional.","startTime":1223700,"duration":3030,"startOfParagraph":false},{"content":"So, I should go into my CSS and find out what part of my CSS is breaking here.","startTime":1226730,"duration":4030,"startOfParagraph":false},{"content":"Why isn't it displaying correctly and fix it so that all users can see the same website","startTime":1230760,"duration":4330,"startOfParagraph":false},{"content":"and be just as happy.","startTime":1235090,"duration":2680,"startOfParagraph":false},{"content":"And finally, well, browser screenshots are nice for testing your CSS,","startTime":1237770,"duration":6510,"startOfParagraph":true},{"content":"but what about your JavaScript?","startTime":1244280,"duration":1740,"startOfParagraph":false},{"content":"What about if you have some complicated script that's running?","startTime":1246020,"duration":2640,"startOfParagraph":false},{"content":"Well, you can always do virtualization.","startTime":1248660,"duration":1800,"startOfParagraph":false},{"content":"If you have a Mac you can use Bootcamp or VMWare to virtualize maybe a copy of","startTime":1250460,"duration":5900,"startOfParagraph":false},{"content":"Windows and use Internet Explorer there.","startTime":1256360,"duration":3180,"startOfParagraph":false},{"content":"Or, you can go on to something like Spoon.net, which unfortunately only works on PCs.","startTime":1259540,"duration":3860,"startOfParagraph":false},{"content":"But what they do is very cool.","startTime":1263400,"duration":1890,"startOfParagraph":false},{"content":"They virtualize software for you so you can run different versions of IE, for example.","startTime":1265290,"duration":4790,"startOfParagraph":false},{"content":"You can run different versions of Firefox. ","startTime":1270080,"duration":2000,"startOfParagraph":false},{"content":"You can run different versions of Safari and test out all of your websites there.","startTime":1272080,"duration":3640,"startOfParagraph":false},{"content":"Unfortunately, they are not free.","startTime":1275720,"duration":2640,"startOfParagraph":false},{"content":"That is a paid service, so there's always sort of this--","startTime":1278360,"duration":2500,"startOfParagraph":false},{"content":"there's always sort of this trade off between, well, am I going to make my website look good.","startTime":1280860,"duration":5210,"startOfParagraph":false},{"content":"If so, I might have to pay for some services to help me do that.","startTime":1286070,"duration":5900,"startOfParagraph":false},{"content":"Any questions at this point about anything that we talked about?","startTime":1291970,"duration":3920,"startOfParagraph":false},{"content":"Awesome. Okay.","startTime":1298500,"duration":2710,"startOfParagraph":false},{"content":"Now we have more things to talk about.","startTime":1301210,"duration":2660,"startOfParagraph":true},{"content":"How about errors?","startTime":1303870,"duration":1950,"startOfParagraph":false},{"content":"How do you make sure that your website is going to operate even when ","startTime":1305820,"duration":2850,"startOfParagraph":false},{"content":"something bad happens?","startTime":1308670,"duration":1480,"startOfParagraph":false},{"content":"Maybe you don't have a page named food.php.","startTime":1310150,"duration":3790,"startOfParagraph":false},{"content":"But me, I go to your website and I try to access food.php.","startTime":1313940,"duration":3060,"startOfParagraph":false},{"content":"Are you just going to show me that white page that says 404--File not found?","startTime":1317000,"duration":3770,"startOfParagraph":false},{"content":"Or are you going to say, \"Well, I'm sorry that I couldn't find this for you,","startTime":1320770,"duration":3630,"startOfParagraph":false},{"content":"but maybe here are some other resources to help you search for what you need.\"","startTime":1324400,"duration":4120,"startOfParagraph":false},{"content":"Other errors--so, this is called HTTP errors which are just some error codes","startTime":1328520,"duration":4660,"startOfParagraph":false},{"content":"that your server might have sent back to the browser in case of something bad happening.","startTime":1333180,"duration":3950,"startOfParagraph":false},{"content":"400--Bad Request. 401--Unauthorized. ","startTime":1337130,"duration":3030,"startOfParagraph":false},{"content":"403 is kind of common when you have a directory that's not supposed to be accessed ","startTime":1340160,"duration":5400,"startOfParagraph":false},{"content":"by the user, but the user tries to anyway.","startTime":1345560,"duration":1750,"startOfParagraph":false},{"content":"And 500--Internal Server Error--that usually happens when you have something","startTime":1347310,"duration":3530,"startOfParagraph":false},{"content":"really bad going on with your PHP code.","startTime":1350840,"duration":2230,"startOfParagraph":false},{"content":"But in any case, these sorts of browsers--these sorts of errors do happen.","startTime":1353070,"duration":3070,"startOfParagraph":false},{"content":"So, how do you make sure that you gracefully handle these errors","startTime":1356140,"duration":4410,"startOfParagraph":true},{"content":"and make sure that the user is not just sort of hanging there?","startTime":1360550,"duration":2680,"startOfParagraph":false},{"content":"Here comes .htaccess.","startTime":1366850,"duration":2000,"startOfParagraph":false},{"content":"Now, .htaccess is something that works on Apache servers,","startTime":1368850,"duration":2450,"startOfParagraph":false},{"content":"something that works and works on a few other servers as well.","startTime":1371300,"duration":4250,"startOfParagraph":false},{"content":"This is just a way for you to configure your server such that","startTime":1375550,"duration":5800,"startOfParagraph":false},{"content":"you can make it do whatever you want it to do.","startTime":1381350,"duration":3120,"startOfParagraph":false},{"content":"Some things you could do. You could control your cache settings.","startTime":1384470,"duration":2320,"startOfParagraph":false},{"content":"Maybe there's a certain page on your website that you make sure that the user","startTime":1386790,"duration":4500,"startOfParagraph":false},{"content":"re-download every time the user comes and visits your website.","startTime":1391290,"duration":3450,"startOfParagraph":false},{"content":"Or maybe you have some URL that's like yoursite.com/test/html/pages/hello.html","startTime":1394740,"duration":12240,"startOfParagraph":false},{"content":"and you just want that to be yourname.com/hello--well, you can use .htaccess","startTime":1406980,"duration":4290,"startOfParagraph":false},{"content":"to redirect one webpage to another.","startTime":1411270,"duration":3490,"startOfParagraph":false},{"content":"You can also use it to do authentication.","startTime":1414760,"duration":1840,"startOfParagraph":false},{"content":"Maybe there are some portions of your website that you need to use another password.","startTime":1416600,"duration":3290,"startOfParagraph":false},{"content":"You can block certain IP addresses, block certain domains.","startTime":1419890,"duration":2730,"startOfParagraph":false},{"content":"Maybe you just really don't like Harvard students using your website.","startTime":1422620,"duration":4150,"startOfParagraph":false},{"content":"Well, you have the option of blocking all Harvard IP addresses.","startTime":1426770,"duration":3140,"startOfParagraph":false},{"content":"Finally, you can treat things--you can write certain code to make your server ","startTime":1429910,"duration":6460,"startOfParagraph":true},{"content":"treat like .zhao or .your name or .hello pages as PHP code.","startTime":1436370,"duration":6730,"startOfParagraph":false},{"content":"Maybe that'll be useful. Maybe that won't be.","startTime":1443100,"duration":2070,"startOfParagraph":false},{"content":"And finally, you can use it to handle error responses.","startTime":1445170,"duration":2810,"startOfParagraph":false},{"content":"What do I mean by that?","startTime":1447980,"duration":2320,"startOfParagraph":false},{"content":"If you simply add code like this--ErrorDocument 404 and then direct them to some","startTime":1450300,"duration":5730,"startOfParagraph":false},{"content":"error page, you can make sure that the user doesn't just see the really, really ugly","startTime":1456030,"duration":4410,"startOfParagraph":false},{"content":"404 and show them something nice.","startTime":1460440,"duration":3110,"startOfParagraph":false},{"content":"Let's actually take a look at how we can do that with your Pset 7.","startTime":1463550,"duration":5450,"startOfParagraph":true},{"content":"Here, I'm in my appliance.","startTime":1469000,"duration":5190,"startOfParagraph":false},{"content":"I'm going to open Chrome, and then I'm going to try to access a page","startTime":1474190,"duration":4250,"startOfParagraph":false},{"content":"that doesn't exist on CS50 Finance.","startTime":1478440,"duration":4910,"startOfParagraph":false},{"content":"So, local host--cats.php--so, notice that I created an error document","startTime":1483350,"duration":9360,"startOfParagraph":false},{"content":"that says, \"Canz not find z page!!\"","startTime":1492710,"duration":2060,"startOfParagraph":false},{"content":"It has a very sad cat on it.","startTime":1494770,"duration":2220,"startOfParagraph":false},{"content":"If you go on Twitter, if you go on any of these other sites,","startTime":1496990,"duration":2920,"startOfParagraph":false},{"content":"you can't find a page, they usually try to show you a cute picture","startTime":1499910,"duration":2790,"startOfParagraph":false},{"content":"so that you're not too disappointed.","startTime":1502700,"duration":2150,"startOfParagraph":false},{"content":"You could also have something that's more professional that says,","startTime":1504850,"duration":2980,"startOfParagraph":false},{"content":"well, I'm sorry I couldn't find the page, but maybe here's a search box.","startTime":1507830,"duration":3930,"startOfParagraph":false},{"content":"Or maybe here are some links that will help you find the link that you want.","startTime":1511760,"duration":4990,"startOfParagraph":false},{"content":"So, how did I do this? How is this even possible?","startTime":1516750,"duration":4660,"startOfParagraph":false},{"content":"If we go into our terminal here--","startTime":1521410,"duration":2090,"startOfParagraph":false},{"content":"I'm just going to zoom in a bit--","startTime":1523500,"duration":2800,"startOfParagraph":false},{"content":"notice that I have a new page.","startTime":1526300,"duration":3810,"startOfParagraph":false},{"content":"Inside my HTML directory it's called--you can't see it--","startTime":1530110,"duration":4330,"startOfParagraph":false},{"content":"it's called error.php.","startTime":1534440,"duration":2840,"startOfParagraph":false},{"content":"And error.php is just a file that I made","startTime":1537280,"duration":3730,"startOfParagraph":false},{"content":"that shows you that page itself.","startTime":1541010,"duration":2020,"startOfParagraph":false},{"content":"I can show you what error.php is.","startTime":1543030,"duration":3680,"startOfParagraph":false},{"content":"It's exactly this page.","startTime":1546710,"duration":2000,"startOfParagraph":false},{"content":"It says, \"Oh no! Canz not find z page!!\"","startTime":1548710,"duration":2000,"startOfParagraph":false},{"content":"And, if you want to see--so, notice that .htaccess sort of is a weird name.","startTime":1550710,"duration":7920,"startOfParagraph":false},{"content":"It starts with a dot which means that it's a system file.","startTime":1558630,"duration":2410,"startOfParagraph":false},{"content":"It's a hidden file which is not normally shown.","startTime":1561040,"duration":2320,"startOfParagraph":false},{"content":"If you do ls-a, you can see all of the hidden files in a certain directory,","startTime":1563360,"duration":5700,"startOfParagraph":false},{"content":"and indeed, you see .htaccess is one of them.","startTime":1569060,"duration":2970,"startOfParagraph":false},{"content":"Let's go ahead and open .htaccess--","startTime":1572030,"duration":3460,"startOfParagraph":false},{"content":"with gedit--","startTime":1575490,"duration":4340,"startOfParagraph":false},{"content":"Boom! All I have is one line in there--Error document for 404 errors","startTime":1579830,"duration":7040,"startOfParagraph":false},{"content":"which are also known as file-not-found errors.","startTime":1586870,"duration":1890,"startOfParagraph":false},{"content":"Let's redirect them to something called error.php.","startTime":1588760,"duration":3960,"startOfParagraph":false},{"content":"You can have fun things like canz not find z page!!","startTime":1596100,"duration":5930,"startOfParagraph":false},{"content":"And there are also very cool things that you can do with .htaccess.","startTime":1602030,"duration":4740,"startOfParagraph":false},{"content":"If you want to see more .htaccess magic,","startTime":1606770,"duration":2750,"startOfParagraph":false},{"content":"this is a very cool website to go to--it's called javascriptkit.com/howto/htaccess.shtml--","startTime":1609520,"duration":6950,"startOfParagraph":false},{"content":"if you want to perform more server magic. And it could be very fun.","startTime":1616470,"duration":5410,"startOfParagraph":false},{"content":"Whew! All right! More cute pictures.","startTime":1621880,"duration":3610,"startOfParagraph":true},{"content":"This is a guy doing push-ups, and his cat is trying to help. I think it's very cute.","startTime":1625490,"duration":4570,"startOfParagraph":false},{"content":"Unfortunately, I don't have a cat like that.","startTime":1630060,"duration":4770,"startOfParagraph":false},{"content":"All right. So, we've talked about .htaccess.","startTime":1634830,"duration":2810,"startOfParagraph":false},{"content":"We've talked about error handling.","startTime":1637640,"duration":2000,"startOfParagraph":false},{"content":"We've talked about hosting, domain names.","startTime":1639640,"duration":1300,"startOfParagraph":false},{"content":"We've talked about cross-browser compatibility.","startTime":1640940,"duration":2290,"startOfParagraph":false},{"content":"Now how do we make sure that your website actually performs?","startTime":1643230,"duration":1980,"startOfParagraph":false},{"content":"How do we make sure that if I go to your website ","startTime":1645210,"duration":1740,"startOfParagraph":false},{"content":"I can see your page within a few seconds?","startTime":1646950,"duration":2880,"startOfParagraph":false},{"content":"One of the things that I think people just sort of forget about","startTime":1649830,"duration":3690,"startOfParagraph":false},{"content":"is image optimization.","startTime":1653520,"duration":2640,"startOfParagraph":false},{"content":"Let's say that you wanted to put a picture on your site","startTime":1656160,"duration":1400,"startOfParagraph":false},{"content":"and it's 2 MG large.","startTime":1657560,"duration":2770,"startOfParagraph":false},{"content":"That might be fine for us because we're at Harvard,","startTime":1660330,"duration":2340,"startOfParagraph":false},{"content":"and we have a very fast Internet connection.","startTime":1662670,"duration":2330,"startOfParagraph":false},{"content":"But imagine someone in China. Imagine someone in India.","startTime":1665000,"duration":2470,"startOfParagraph":false},{"content":"imagine someone maybe in rural Kansas who maybe doesn't have the same sort of","startTime":1667470,"duration":4970,"startOfParagraph":false},{"content":"broadband Internet that we have.","startTime":1672440,"duration":2250,"startOfParagraph":false},{"content":"If you have a 2 MB image on your site and the user is trying to access it,","startTime":1674690,"duration":3020,"startOfParagraph":false},{"content":"it's going to take them a really long time to download.","startTime":1677710,"duration":3180,"startOfParagraph":false},{"content":"So, if you don't need that sort of resolution,","startTime":1680890,"duration":3270,"startOfParagraph":false},{"content":"then you can resize your image with something like Adobe Photo Shop.","startTime":1684160,"duration":5060,"startOfParagraph":false},{"content":"There's usually an option called safe for web and devices,","startTime":1689220,"duration":4180,"startOfParagraph":false},{"content":"and what it does is it strips out all of the unnecessary information","startTime":1693400,"duration":2450,"startOfParagraph":false},{"content":"and sort of compacts your file into a small image size so that you can","startTime":1695850,"duration":4310,"startOfParagraph":false},{"content":"put it onto your website, and any user who tries to download that page","startTime":1700160,"duration":2800,"startOfParagraph":false},{"content":"is going to download a smaller version of your image.","startTime":1702960,"duration":3990,"startOfParagraph":false},{"content":"If you don't have Adobe Photo Shop","startTime":1706950,"duration":1280,"startOfParagraph":false},{"content":"webresizer.com is also another resource where you can input your image","startTime":1708230,"duration":4420,"startOfParagraph":false},{"content":"and it will spit out the exact same image,","startTime":1712650,"duration":3820,"startOfParagraph":false},{"content":"but it will be something like 3 times smaller.","startTime":1716470,"duration":3500,"startOfParagraph":false},{"content":"So that's very useful for your users.","startTime":1719970,"duration":2000,"startOfParagraph":false},{"content":"Another thing that you can do is minify code.","startTime":1721970,"duration":3960,"startOfParagraph":true},{"content":"If we take a look at Google.com,","startTime":1725930,"duration":2530,"startOfParagraph":false},{"content":"you'll see that it's not sort of the same HTML and CSS that we're used to.","startTime":1728460,"duration":7940,"startOfParagraph":false},{"content":"Just going to look at the source code here.","startTime":1736400,"duration":5850,"startOfParagraph":false},{"content":"If I just scroll down--wow, that looks pretty disgusting.","startTime":1742250,"duration":5350,"startOfParagraph":false},{"content":"This would get a zero on style.","startTime":1747600,"duration":2050,"startOfParagraph":false},{"content":"If you coded this for your Pset, you will get a zero on your style.","startTime":1749650,"duration":3820,"startOfParagraph":false},{"content":"This has no spacing. The names look really cryptic.","startTime":1753470,"duration":3520,"startOfParagraph":false},{"content":"It's all really disgusting.","startTime":1756990,"duration":2810,"startOfParagraph":false},{"content":"And the script to close in the body--the closing HTML--","startTime":1759800,"duration":4260,"startOfParagraph":false},{"content":"they're all together--all smushed together.","startTime":1764060,"duration":2220,"startOfParagraph":false},{"content":"Why do they do this?","startTime":1766280,"duration":2000,"startOfParagraph":false},{"content":"They minified their code.","startTime":1768280,"duration":2370,"startOfParagraph":false},{"content":"Notice that this document is going to be a lot smaller","startTime":1770650,"duration":2660,"startOfParagraph":false},{"content":"for me to download than something with white space,","startTime":1773310,"duration":3350,"startOfParagraph":false},{"content":"than something with really long variable names.","startTime":1776660,"duration":2750,"startOfParagraph":false},{"content":"If you minify your code you strip out all the white space.","startTime":1779410,"duration":2300,"startOfParagraph":false},{"content":"Of course, your browser doesn't care if you have any white space in your code.","startTime":1781710,"duration":4250,"startOfParagraph":false},{"content":"You strip it out, now I can download a smaller file--","startTime":1785960,"duration":3670,"startOfParagraph":false},{"content":"now the file--the document that we're going to download has a smaller file size,","startTime":1789630,"duration":3140,"startOfParagraph":false},{"content":"it will be faster for me to download, and that's useful.","startTime":1792770,"duration":3410,"startOfParagraph":false},{"content":"If you're working with websites and you're launching a website,","startTime":1796180,"duration":5370,"startOfParagraph":false},{"content":"it's almost always good to minify your code.","startTime":1801550,"duration":3080,"startOfParagraph":false},{"content":"Another reason why it might be good is maybe you don't want others to use your code.","startTime":1804630,"duration":3520,"startOfParagraph":false},{"content":"Maybe you don't want others to use your CSS.","startTime":1808150,"duration":2900,"startOfParagraph":false},{"content":"You know if you really wanted to be stingy with that,","startTime":1811050,"duration":2410,"startOfParagraph":false},{"content":"then you can also minify your code, and it would be harder for me to steal it","startTime":1813460,"duration":3210,"startOfParagraph":false},{"content":"because I have no idea what's going on.","startTime":1816670,"duration":2500,"startOfParagraph":false},{"content":"You can also go to websites like minify.avivo.si.","startTime":1819170,"duration":3820,"startOfParagraph":false},{"content":"Services like this online help you minify your code so that you don't have to do it by hand.","startTime":1822990,"duration":4910,"startOfParagraph":false},{"content":"Definitely do not do it by hand.","startTime":1827900,"duration":2180,"startOfParagraph":false},{"content":"Okay. Now speaking about scripts.","startTime":1830080,"duration":2130,"startOfParagraph":true},{"content":"Maybe in your PHP code there's something that you don't need to do.","startTime":1832210,"duration":2830,"startOfParagraph":false},{"content":"Maybe there's extra loops in there.","startTime":1835040,"duration":2870,"startOfParagraph":false},{"content":"We talked about code design in CS50.","startTime":1837910,"duration":2940,"startOfParagraph":false},{"content":"Even if you're coding in C if you have--if you're doing extra work","startTime":1840850,"duration":3700,"startOfParagraph":false},{"content":"that you don't need to do, well, that's going to slow down your scripts on your website,","startTime":1844550,"duration":4890,"startOfParagraph":false},{"content":"and this is especially important for websites because users nowadays are very impatient.","startTime":1849440,"duration":3840,"startOfParagraph":false},{"content":"If you're doing unnecessary work, it's going to take them longer ","startTime":1853280,"duration":2830,"startOfParagraph":false},{"content":"to get to the information that they want, and they're going to be very unhappy.","startTime":1856110,"duration":3970,"startOfParagraph":false},{"content":"Finally, you may want to optimize your database tables.","startTime":1860080,"duration":2120,"startOfParagraph":false},{"content":"Remember we talked about indexes.","startTime":1862200,"duration":2820,"startOfParagraph":false},{"content":"They're not only good for making sure that you have a row that's unique.","startTime":1865020,"duration":4400,"startOfParagraph":false},{"content":"They're also good for making sure that your database works fast.","startTime":1869420,"duration":3020,"startOfParagraph":false},{"content":"If you want to read up on that go to the MySQL documentation,","startTime":1872440,"duration":3800,"startOfParagraph":false},{"content":"or you can look at--well, how do I optimize my database table?","startTime":1876240,"duration":2470,"startOfParagraph":false},{"content":"How do I make sure that I have indices that help me get to the information faster?","startTime":1878710,"duration":4640,"startOfParagraph":false},{"content":"There are also little tricks that you can use like caching.","startTime":1883350,"duration":3950,"startOfParagraph":true},{"content":"If you have PHP--if you have a blog, for example,","startTime":1887300,"duration":1680,"startOfParagraph":false},{"content":"and you have--and it's powered by PHP or by any other language--","startTime":1888980,"duration":3000,"startOfParagraph":false},{"content":"you can cache your blog at let's say 50-minute intervals so that you can serve static pages","startTime":1891980,"duration":5710,"startOfParagraph":false},{"content":"or static HTML to the visitors to your site.","startTime":1897690,"duration":2920,"startOfParagraph":false},{"content":"That way the users don't have to run your PHP script every time,","startTime":1900610,"duration":2770,"startOfParagraph":false},{"content":"and maybe that will be faster for them to access that information.","startTime":1903380,"duration":4030,"startOfParagraph":false},{"content":"And finally, you can use something like CDN.","startTime":1907410,"duration":2000,"startOfParagraph":true},{"content":"Notice that whenever you download a Pset, ","startTime":1909410,"duration":2490,"startOfParagraph":false},{"content":"you always go to CDN.CS50.net. Why is that?","startTime":1911900,"duration":2990,"startOfParagraph":false},{"content":"CS50 also uses sort of like a CDN--a content distribution network--","startTime":1914890,"duration":6650,"startOfParagraph":false},{"content":"which just means that it's a bunch of servers maybe somewhere around the globe","startTime":1921540,"duration":4580,"startOfParagraph":false},{"content":"that help serve your pages to your visitors.","startTime":1926120,"duration":2000,"startOfParagraph":false},{"content":"If your visitor is getting a page from a server that's closer to them geographically,","startTime":1928120,"duration":5650,"startOfParagraph":false},{"content":"then most likely your visitor is going to get that file a lot faster.","startTime":1933770,"duration":3000,"startOfParagraph":false},{"content":"There are also sources online that help you do that.","startTime":1936770,"duration":3720,"startOfParagraph":false},{"content":"One of them is CloudFlare. They offer a free CDN service.","startTime":1940490,"duration":3580,"startOfParagraph":false},{"content":"If you have large files that your serving to your users,","startTime":1944070,"duration":1950,"startOfParagraph":false},{"content":"then perhaps it's better to put them on a CDN so that they can get to them faster.","startTime":1946020,"duration":6240,"startOfParagraph":false},{"content":"The final topic for the day is search engine optimization.","startTime":1952260,"duration":6810,"startOfParagraph":true},{"content":"What is search engine optimization?","startTime":1959070,"duration":2000,"startOfParagraph":false},{"content":"That's making sure that search engines like Google or Bing or Yahoo ","startTime":1961070,"duration":3000,"startOfParagraph":false},{"content":"can go on to your site and crawl your site and index your site and when","startTime":1964070,"duration":6670,"startOfParagraph":false},{"content":"I, for example, go on to Google.com and I try to search for something,","startTime":1970740,"duration":2300,"startOfParagraph":false},{"content":"then your site will pop up.","startTime":1973040,"duration":2000,"startOfParagraph":false},{"content":"How do you make sure that your site is one of the top 10?","startTime":1975040,"duration":1960,"startOfParagraph":false},{"content":"Because as we all know, if you search for something on Google","startTime":1977000,"duration":3000,"startOfParagraph":false},{"content":"and it's not on the top 10 you're most likely not going to look in the next 10.","startTime":1980000,"duration":2880,"startOfParagraph":false},{"content":"This is sort of a topic that's shrouded in mystery.","startTime":1982880,"duration":4280,"startOfParagraph":false},{"content":"There's a lot of hype out there on the Internet.","startTime":1987160,"duration":2690,"startOfParagraph":false},{"content":"There are a lot of superstitions about if you do x then Google will like you better.","startTime":1989850,"duration":4830,"startOfParagraph":false},{"content":"If you do y then Google will like you better.","startTime":1994680,"duration":2000,"startOfParagraph":false},{"content":"It's probably better to look into the search giant's documents itself.","startTime":1996680,"duration":3000,"startOfParagraph":false},{"content":"This is one of the documents on Google that tell you exactly how to optimize your site","startTime":1999680,"duration":7790,"startOfParagraph":true},{"content":"so that Google can access and index it very nicely.","startTime":2007470,"duration":3390,"startOfParagraph":false},{"content":"You don't have to copy down this URL because this presentation is going to ","startTime":2010860,"duration":2820,"startOfParagraph":false},{"content":"be online anyway.","startTime":2013680,"duration":3000,"startOfParagraph":false},{"content":"If you look at this and you read this there are some very helpful hints in there.","startTime":2016680,"duration":2090,"startOfParagraph":false},{"content":"The Google tells you--if you really want your site to be indexed well","startTime":2018770,"duration":3470,"startOfParagraph":false},{"content":"then you should do all of these things.","startTime":2022240,"duration":2370,"startOfParagraph":false},{"content":"Another thing that search engines really like is fresh content.","startTime":2024610,"duration":2960,"startOfParagraph":true},{"content":"If you have content that's updated very regularly","startTime":2027570,"duration":1930,"startOfParagraph":false},{"content":"then search engines say, ooh, I like your site.","startTime":2029500,"duration":2450,"startOfParagraph":false},{"content":"I'm going to go to your site very often.","startTime":2031950,"duration":2000,"startOfParagraph":false},{"content":"I'm going to index a lot of your pages.","startTime":2033950,"duration":2890,"startOfParagraph":false},{"content":"If you have fresh content then you're more likely to show up--","startTime":2036840,"duration":2720,"startOfParagraph":false},{"content":"you're more likely to be more relevant.","startTime":2039560,"duration":2980,"startOfParagraph":false},{"content":"You're more likely to be more updated, ","startTime":2042540,"duration":2090,"startOfParagraph":false},{"content":"and search engines are more likely to put your site above others.","startTime":2044630,"duration":4230,"startOfParagraph":false},{"content":"Deep links are also important.","startTime":2048860,"duration":2000,"startOfParagraph":true},{"content":"If you really wanted your site to look good in a search engine's eyes","startTime":2050860,"duration":2670,"startOfParagraph":false},{"content":"have a lot of other websites linked to it and linked deeply into your website.","startTime":2053530,"duration":4560,"startOfParagraph":false},{"content":"Don't just link to your homepage.","startTime":2058090,"duration":2000,"startOfParagraph":false},{"content":"Link to maybe yourname.com/something/something/something.php.","startTime":2060090,"duration":6629,"startOfParagraph":false},{"content":"That--to a search engine--means, wow, they have really interesting content","startTime":2066719,"duration":3121,"startOfParagraph":false},{"content":"that someone else is linking so deeply into their site that I should really, really ","startTime":2069840,"duration":5510,"startOfParagraph":false},{"content":"put more importance onto that site's pages.","startTime":2075350,"duration":2910,"startOfParagraph":false},{"content":"If you have accurate page titles, if you have no errors that's good because","startTime":2078260,"duration":3680,"startOfParagraph":true},{"content":"if a search engine is trying to visit your site, and it's getting an error,","startTime":2081940,"duration":2730,"startOfParagraph":false},{"content":"it's probably going to give up very, very soon.","startTime":2084670,"duration":2110,"startOfParagraph":false},{"content":"And finally, you want to have a fast load time because search engines--","startTime":2086780,"duration":2730,"startOfParagraph":false},{"content":"just like humans--don't have a lot of patience for slow websites.","startTime":2089510,"duration":4310,"startOfParagraph":false},{"content":"This is a way for you to make sure that you show up higher in","startTime":2093820,"duration":3250,"startOfParagraph":false},{"content":"search engine queries and hopefully thereby get more traffic.","startTime":2097070,"duration":4320,"startOfParagraph":false},{"content":"Because after all, you've spent all this time developing your website.","startTime":2101390,"duration":3340,"startOfParagraph":false},{"content":"You spent all this time launching this website online.","startTime":2104730,"duration":1550,"startOfParagraph":false},{"content":"You want to make sure that you have plenty of users who actually see your content.","startTime":2106280,"duration":5500,"startOfParagraph":false},{"content":"Other good resources to use.","startTime":2113330,"duration":2330,"startOfParagraph":true},{"content":"Google Webmaster Tools is something to look in to.","startTime":2115660,"duration":3550,"startOfParagraph":false},{"content":"This just helps you to see--Google isn't indexing my site.","startTime":2119210,"duration":2570,"startOfParagraph":false},{"content":"What sorts of errors is it encountering?","startTime":2121780,"duration":2710,"startOfParagraph":false},{"content":"How many pages has it indexed?","startTime":2124490,"duration":3000,"startOfParagraph":false},{"content":"What does it think is the most important content on my page?","startTime":2127490,"duration":2000,"startOfParagraph":false},{"content":"Maybe that's not what I want it to be.","startTime":2129490,"duration":2000,"startOfParagraph":false},{"content":"Maybe I need to change my website a little bit such that it's reflected better","startTime":2131490,"duration":5390,"startOfParagraph":false},{"content":"what my website is really about.","startTime":2136880,"duration":2000,"startOfParagraph":false},{"content":"Google Analytics is another really cool tool.","startTime":2138880,"duration":2120,"startOfParagraph":false},{"content":"You can add a little bit of JavaScript to your pages.","startTime":2141000,"duration":3120,"startOfParagraph":false},{"content":"And then afterwards you can go to Google Analytics, and it will track","startTime":2144120,"duration":2900,"startOfParagraph":false},{"content":"your visitor demographics and your site growth.","startTime":2147020,"duration":2000,"startOfParagraph":false},{"content":"It will tell you exactly how many visitors visit your site","startTime":2149020,"duration":2790,"startOfParagraph":false},{"content":"within a certain day, within a certain hour, within a certain week.","startTime":2151810,"duration":3500,"startOfParagraph":false},{"content":"How many visitors from China? How many visitors from Antarctica--","startTime":2155310,"duration":2000,"startOfParagraph":false},{"content":"you're getting to your website.","startTime":2157310,"duration":2000,"startOfParagraph":false},{"content":"that might be something cool to see or it might even be useful","startTime":2159310,"duration":4160,"startOfParagraph":false},{"content":"because you're trying to target a certain group.","startTime":2163470,"duration":2000,"startOfParagraph":false},{"content":"Maybe you're trying to target teenagers with your website, and you see that","startTime":2165470,"duration":2940,"startOfParagraph":false},{"content":"most of the visitors to your website are maybe 30- to 40-year olds,","startTime":2168410,"duration":3000,"startOfParagraph":false},{"content":"then maybe either you have a problem or you can just say,","startTime":2171410,"duration":3720,"startOfParagraph":false},{"content":"well, then maybe I should just change my website's focus so that ","startTime":2175130,"duration":4460,"startOfParagraph":false},{"content":"I focus more on that age group.","startTime":2179590,"duration":2650,"startOfParagraph":false},{"content":"Google Apps--if you wanted to have sort of emails with your domain name--","startTime":2182240,"duration":6260,"startOfParagraph":true},{"content":"maybe something like yourname@yourname.com--","startTime":2188500,"duration":2730,"startOfParagraph":false},{"content":"you can use gmail addresses--you can use the gmail service","startTime":2191230,"duration":4040,"startOfParagraph":false},{"content":"and Google Apps is one way to do that.","startTime":2195270,"duration":3230,"startOfParagraph":false},{"content":"You can set up specific email addresses that are specific to your domain name","startTime":2198500,"duration":5550,"startOfParagraph":false},{"content":"instead of @gmail.com.","startTime":2204050,"duration":2750,"startOfParagraph":false},{"content":"And finally, there are web developer extensions and add-ons--for Chrome,","startTime":2206800,"duration":5040,"startOfParagraph":true},{"content":"for Firefox, for other browsers--that allow you to go in and inspect","startTime":2211840,"duration":4540,"startOfParagraph":false},{"content":"CSS, inspect JavaScript, see exactly what's wrong with your JavaScript script,","startTime":2216380,"duration":5910,"startOfParagraph":false},{"content":"and maybe that'll be useful for your de-bugging purposes, for you finding out--","startTime":2222290,"duration":3000,"startOfParagraph":false},{"content":"well, why isn't my website displaying correctly in this browser?","startTime":2225290,"duration":3340,"startOfParagraph":false},{"content":"And finally, if you wanted to learn more about all these topics--","startTime":2228630,"duration":3170,"startOfParagraph":true},{"content":"if you wanted to learn more about HTML and CSS and JavaScript--","startTime":2231800,"duration":2610,"startOfParagraph":false},{"content":"because after all, we only taught you a little bit--","startTime":2234410,"duration":2380,"startOfParagraph":false},{"content":"you can go websites like W3Schools.com to look for more resources.","startTime":2236790,"duration":4450,"startOfParagraph":false},{"content":"They have very nice tutorials on how do I do x, or what does y mean?","startTime":2241240,"duration":5100,"startOfParagraph":false},{"content":"If you wanted to learn more about these languages you can simply go here.","startTime":2246340,"duration":4060,"startOfParagraph":false},{"content":"All right. I think I wanted to leave the last few minutes of this for questions,","startTime":2250400,"duration":7290,"startOfParagraph":true},{"content":"so are there any questions about anything that we talked about?","startTime":2257690,"duration":2120,"startOfParagraph":false},{"content":"[audience member] What kinds of things are on W3Schools and how is it covered?","startTime":2259810,"duration":3690,"startOfParagraph":false},{"content":"[Yuechen Zhao] What kinds of things?","startTime":2263500,"duration":2000,"startOfParagraph":false},{"content":"So, one of the very biggest things that I use a lot is their references.","startTime":2265500,"duration":4680,"startOfParagraph":false},{"content":"Their references detail, for example for CSS--","startTime":2270180,"duration":4250,"startOfParagraph":false},{"content":"what this means or if you wanted to change the background of a page--","startTime":2274430,"duration":5050,"startOfParagraph":false},{"content":"how do you do it?","startTime":2279480,"duration":2000,"startOfParagraph":false},{"content":"Which browsers support that command? Things like that.","startTime":2281480,"duration":3070,"startOfParagraph":false},{"content":"And then they also just have very nice tutorials on HTML, on PHP, on JavaScript,","startTime":2284550,"duration":6320,"startOfParagraph":false},{"content":"on MySQL, on all sorts of different topics.","startTime":2290870,"duration":3420,"startOfParagraph":false},{"content":"They have nice tutorials. They teach you how to do things.","startTime":2294290,"duration":4510,"startOfParagraph":false},{"content":"It's nice to be able to go and learn more about these topics.","startTime":2298800,"duration":3790,"startOfParagraph":false},{"content":"[audience member] HTML 5 is still not compatible with all the browsers out there.","startTime":2302590,"duration":4590,"startOfParagraph":true},{"content":"Would you recommend just staying away from it because of compatibility issues?","startTime":2307180,"duration":3520,"startOfParagraph":false},{"content":"How would you deal with that?","startTime":2310700,"duration":2000,"startOfParagraph":false},{"content":"[Yuechen Zhao] Yes, so, the question is HTML5 is still a baby standard.","startTime":2312700,"duration":5940,"startOfParagraph":false},{"content":"It's not really supported by a lot of browsers, so should we avoid it?","startTime":2318640,"duration":3390,"startOfParagraph":false},{"content":"I think last year I would have been a very big proponent of, let's avoid HTML5","startTime":2322030,"duration":6010,"startOfParagraph":false},{"content":"because it is still--it's still very much new and in fact, the HTML5 standard","startTime":2328040,"duration":4390,"startOfParagraph":false},{"content":"has not been finalized yet.","startTime":2332430,"duration":3180,"startOfParagraph":false},{"content":"And so, there really is no HTML5 standard.","startTime":2335610,"duration":3180,"startOfParagraph":false},{"content":"But I think especially if you're designing a website now,","startTime":2338790,"duration":5050,"startOfParagraph":false},{"content":"it might be better if you just go with HTML5 because that's sort of going to be the future,","startTime":2343840,"duration":3610,"startOfParagraph":false},{"content":"and if you want your website to be future-proof and you want your website to work ","startTime":2347450,"duration":3800,"startOfParagraph":false},{"content":"in future browsers, it might be better to start building something for the future","startTime":2351250,"duration":3070,"startOfParagraph":false},{"content":"than for the past, and also just because of the fact that HTML5 really isn't that different","startTime":2354320,"duration":5510,"startOfParagraph":false},{"content":"from HTML4 or XHTML.","startTime":2359830,"duration":3250,"startOfParagraph":false},{"content":"If you are using HTML5, it normally will work in most browsers.","startTime":2363080,"duration":6700,"startOfParagraph":false},{"content":"You just have to sort of go in and make sure with these screenshots","startTime":2369780,"duration":4880,"startOfParagraph":false},{"content":"and making sure with going on to these websites yourself.","startTime":2374660,"duration":3970,"startOfParagraph":false},{"content":"But most likely it will work unless you're using very specific features to HTML5.","startTime":2378630,"duration":5650,"startOfParagraph":false},{"content":"Notice too that for CS50--for example, for the video player that we use--","startTime":2384280,"duration":5960,"startOfParagraph":false},{"content":"it uses HTML5 and HTML5 video to display the lectures.","startTime":2390240,"duration":5990,"startOfParagraph":false},{"content":"But if you have a really old browser, then it'll fall back on Flash.","startTime":2396230,"duration":3190,"startOfParagraph":false},{"content":"So, that's also something else--","startTime":2399420,"duration":2000,"startOfParagraph":false},{"content":"have a fall-back system for when you just know that the browser isn't going to handle","startTime":2401420,"duration":3770,"startOfParagraph":false},{"content":"what you want it to handle.","startTime":2405190,"duration":2950,"startOfParagraph":false},{"content":"Other questions?","startTime":2408140,"duration":2000,"startOfParagraph":true},{"content":"Anything that we talked about.","startTime":2410140,"duration":3130,"startOfParagraph":false},{"content":"All right. Then I think that's about it for me.","startTime":2416910,"duration":3840,"startOfParagraph":false},{"content":"I think that's it.","startTime":2420750,"duration":2340,"startOfParagraph":false},{"content":"(applause)","startTime":2423090,"duration":5340,"startOfParagraph":false},{"content":"Cool.","startTime":2428430,"duration":1570,"startOfParagraph":false},{"content":"[CS50.TV]","startTime":2430500,"duration":2200,"startOfParagraph":false}]}