Is it better to display latest tweets on a webpage using the PHP API or Javascript?

I want to display a user's latest Tweets on a webpage while maintaining the ability to style the Tweets with custom CSS and also maintaining good page load speed. I have managed to display the latest Tweets in 2 ways. 1. Using the [PHP Twitter library][1] (by Aaron Brazell). By using this method, my PHP code has to wait for a response from Twitter before my page can be completed and sent to the client. This could cause the page load time to be quite unpredictable and more than likely slow down the page load enough to be annoying to users. 2. Using the Blogger Twitter Widget, the latest Tweets are loaded using JavaScript after the rest of the page has loaded. This way user's don't have to wait for Twitter response before they can view the page. I would like to know if there are any other pro's and con's to using these different methods to display a user's latest Tweets, and also if there is perhaps another solution I can look into which will enable custom CSS styling and provide good page load performance? Also, how do these 2 methods influence the way Twitter applies Rate Limiting? Using PHP I can cache the Tweets and therefore make fewer calls to Twitter, while using JavaScript this is not possible as far as I know? [1]: http://emmense.com/php-twitter/

以上就是Is it better to display latest tweets on a webpage using the PHP API or Javascript?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏