The highlight of using JavaScript is that webpage content can be generated can be created dynamically, as opposed to being completely hard coded. One such example is that of the “write” function. The webpage in many cases will be referred to as the “document” object.
<html>
<body>
<script type="text/javascript">
document.write(<h2>The Title</h2>);
document.write(<p>The Content</p>);
</script>
</body>
</html>
When the webpage loads, the html tags and their contents will be written into the page as if they were hardcoded into the page. Yes, the example is a bit goofy, but it is simplistic for this purpose. The uses of dynamic content can span into many fields of the website. Based upon a user’s answers or preferences a whole different block of text could be shown. This can be based on the user’s browser, age, gender, geographical location, and other such details.
If the sex of the user is known, it could be used to change a reference to gender based words accordingly. Adding a “him” or “her” to the right positions adds an extra layer of personalization to a webpage. This gender personalization could also expand into the photos and advertising shown when they are viewing the webpage. The same customizations will follow for age and geographical location. The marketing purposes of this simple coding can go along way.
This practice has already been in use for a long time now. Did you ever notice the ads on Facebook that refer to the city you live in? That is because they know where you live, or the general area anyways. And since you have an account there, they know specifics about you. It would be safe to assume that the ads guys see are not the same ads the young ladies see. They tailor the ads to what they believe your interests are.
90f8f97e-1bde-438b-b6a4-612eb1e1c13d|0|.0