Use CloudFront as a Content Delivery Network on Rails

  • Feb
    25

A few days ago we were facing a serious performance issue with our server. We did an upgrade on the server as main meassure to address this issue, but as a secondary meassure we decided to serve our static files from another server. After reading a little I found that one option was to use Amazon's CloudFront.

What is CloudFront:

Amazon CloudFront is a content delivery web service. It integrates with other Amazon Web Services to give developers and businesses an easy way to distribute content to end users with low latency, high data transfer speeds, and no commitments. (http ...

Social Buttons via Ajax

  • Feb
    25

On our app we have a Blog Index page where all the post are loaded using infnite scrolling, in every post's display there are social networks buttons (Twitter, Facebook and G+) that show how many likes, tweets or +1's has. Everytime someone got down far enough to new posts to be loaded, these buttons wouldn't appear.

After fixing some other bugs with that code, I found that this buttons are displayed via a "search and replace" code, that is executed once everytime the page loads, that's why when loaded via ajax they wouldn't show.

Searching I found an answer to ...