Tag javascript

9 votes

13543 views

Put scripts at the bottom

Do you experience that your website renders slow due to loading a lot of javascripts, especially loading some third-party javascripts? Move script tags to the bottom of body can speed up the render of your website.

Comments

flyerhzm

27 votes

29349 views

Not use time_ago_in_words

It's very common for a rails developer to use time_ago_in_words to display time like "5 minutes ago", but it's too expensive to calculate the time in server side, you should utilize client cpu to calculate the time ago.

implemented

Comments

flyerhzm