While there are seemingly a lot of benefits to having a dynamic website, it can also cause your website to load slowly if you’re trying to dynamically load up too much at once.Īlso if you have one particular page getting requested again and again, and nothing is changing on the page itself, all that dynamic creation of that page over and over can lead to resource usage problems on the server. You might be thinking at this point that this sounds great, why don’t I just always make my website dynamic? Static websites save on resources Now if you all the sudden wanted to change the title across your 50 different PHP scripts, all you’d need to do is go back and just edit the config.php file and change the $title variable to use the new text.īecause each of your PHP pages is generated dynamically, the server will first check the config.php script every single time one of the pages is requested to see what the title should be. This is where having a dynamic website can come in handy because now you could do this: Now lets say that you have 50 different PHP scripts, and you wanted each title to start with the same text. The same thing happens with the $body variable printing out This is an example dynamic website. That PHP process also includes the config.php script, and so when it gets down to the line where it prints out the $title variable, instead of printing out that actual word, it prints My dynamic website. Now every time a visitor comes to the index.php script, the server has to fire up a PHP process to run the script. This is because the config.php file sets up variables to use, and the index.php script then includes these variables to create the actual page. In its simplest form this example below would be considered a dynamic website. This gives the user a front-end to easily adjust some of the dynamic variables of the site. This type of software uses scripts to connect to databases that pull in info to piece together a complete website. Pretty much any CMS (Content Management System) that you run on a server, such as WordPress, Joomla, or Drupal and many others, will create a dynamic website. In order to be dynamic, the website runs a server-side scripting language to dynamically create the page being requested by each visitor. Probably the most frequently used type of website today would be a dynamic website. While static websites are fast in nature, because they don’t ask the server to do extra work, other than just handing off already completed files to the visitor.Įach one has its own advantages and disadvantages, and in this guide I’ll discuss why you might want to use one over the other in your specific case. These are the two types of websites that currently exist on the Internet.Ī quick break down would be that dynamic websites require more server resources, but provide more flexibility when it comes to updating them. If you are trying to speed up your website, it’s important to first know the difference between a dynamic website, and a static website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |