I have a PHP page which fetches data from a MYSQL database and generates HTML content based on rows returned from the database.

I am adding a new row in database on click of a button using AJAX, Jquery and PHP. After adding the new row, I am using `window.location.reload(true);` to reload the page. But the HTML elements corresponding to new row are not shown when I click the button. However, if I manually refresh the page using F5, the newly added content is shown.

Anyone knows why this could happen?

Below is the function which I call on click of a button. The page increaseCount.php updates database to increase the count of actors. But the HTML elements corresponding to new count are not shown until I refresh the page using F5.

```
        function increaseCountOfNewActor(characterName) {
            var actorName = document.getElementById("txt_actor_"+characterName).value;
            var actorImage = document.getElementById("img_actor_"+characterName).src;
            $.ajax( {
                url: "increaseCount.php",
                method: "POST",
                data: {
                    name: actorName,
                    image: actorImage,
                    character: characterName
                },
                success: function( data ) {
                    alert("Vote received");
                }
            } );
            window.location.reload(true);
        }

```