I'm sure you've noticed that when you shop online, websites will often provide you with personalized recommendations. But when your friends login to those same websites, the recommendations will differ. But did you ever wonder how websites adapt to different user profiles? In this video, you'll learn the difference between static and dynamic content. You will also be able to differentiate between the role of a web server and an application server. By now, you know that when you open a website, a web server sends the website's content to your browser. The content can be static or dynamic. Static content is files that the server transfers just as they are stored on the web server, such as videos or images. Dynamic content, on the other hand, is generated when the HTTP request is made. For example, the content may be generated based on input from a user, or when you visit a news website, it would be based on the current date. What actually happens, is that the web server communicates with another kind of server, called an application server or a back-end. The application server generates the dynamic content that the web server sends back to the user's browser. Now you know the difference. Let's look at examples of how websites update static and dynamic content. Say for instance, you want to watch a video on a website, you click on the Play button and a request is sent to the web server. The web server responds by sending the file to your browser. Now, how does this compare to dynamic content? Because dynamic content is generated while you use a website, it typically takes longer to generate than it takes to send back static content. For example, when you log into this course, the web server communicates with an application server to check that you are in fact enrolled. The application server confirms your enrollment and specifies what content should show for your profile specifically. Application servers perform more complex processing than web servers. For instance, they have to run the application logic, communicate with the database, and check permissions. To improve performance, different application servers have specific purposes. There are application servers for every type of content out there, from music streaming to creating your own blog. You can even create your own application servers, such as building a back-end for a web application. But hang on, If dynamic content is slower to generate, isn't that a problem for big websites? Yes, it is. Application servers typically have a limited capacity on how many requests they can process per second. But fortunately, this is where the web server can help out. Web servers use a process called caching instead of generating content dynamically for every request. Caching means the web server keeps a copy of dynamic content. If the content is requested again, the web server can immediately send this cached version instead of passing the request again to the application server. On the first request for dynamic content, the web server checks if the content exists in the cache. If it does not exist, the content is requested from the application server and stored in the cache. The web server then sends back the dynamic content to the browser. On subsequent requests, the web server immediately sends back the content stored in the cache. This reduces the amount of dynamic content that the application server has to generate. Then, after a period of time or with the next user interaction, the web server updates the cache with the latest content. Now you know the difference between static and dynamic content, as well as the difference between web and application servers. With this new information, try to identify with the content on the websites you visit is static or dynamic.