: Page speed - Loading comments on an article/blog post So I'm currently building a template page to use for articles that we will be purchasing from a content writer (so basically we are content
So I'm currently building a template page to use for articles that we will be purchasing from a content writer (so basically we are content marketing). I'm finishing up the layout on the comment section and I implemented a little system where the page only renders 3 comments and displays the rest if the user pushes a button, called "view more comments".
As far as page speed goes, what's the best approach to loading up the comments without affecting the loading time much? I plan on using a PHP script to query a MySQL database to pull out the comments for a requested article. From there I can either have the script run directly from the template and load the comments as an array (associative or multidimensional), or I can instead use AJAX and bring them out in the response as a JSON object. Not sure if I should load up all comments at once or in sets of 3 or 4, etc. So let me know what's best in terms of speed and not interfering with loading times, or if such issue even matters.
More posts by @Speyer207
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.