I want to display the user's last tweets on a web page, while still being able to erase tweets with custom CSS, and also maintain good page loading speed.
I managed to display the latest tweets in two ways.
Using PHP Twitter library (author Aaron Brazell). Using this method, my PHP code must wait for a response from Twitter before my page is completed and sent to the client. This can cause page load times to be very unpredictable and most likely slow down page loading in order to annoy users.
Using Blogger's Twitter Widget, the latest Tweets are loaded using JavaScript after loading the rest of the page. Thus, the user does not need to wait for a Twitter response before they can view the page.
I would like to know if there are any other pro and con to use these different methods to display the last tweets of the user, and also, if there is, possibly another solution that I can look into, which will include custom CSS style and provide good page loading performance?
Also, how do these 2 methods affect how Twitter applies speed limits? Using PHP, I can cache tweets and therefore make fewer Twitter calls using JavaScript, is that impossible, as far as I know?
source
share