Mobile app version of vmapp.org
Login or Join
Speyer207

: 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

@Speyer207

Posted in: #Ajax #Blog #Comments #PageSpeed #Php

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme