TL:DR doing whatever it took to get the big element on the page first

Get the big element on your page as quick as you can

That means get it there before as many other things happen as you can.

This means prioritising it in your loading and making sure the HTML renders as early as possible.

I found this way of thinking about it much easier then trying to optimise everything (faster server response, inline critical css, minimize non-critical JS, reduce image size etc. etc.)

This realisation led to the two things which helped our LCP the most in our Rails app.

a) Server side render any LCP element. Waiting for JS to run to render your element always means there’s an avoidable delay.

b) preload the image as early as possible for the LCP element.

TL:DR — install the heroku-builds plugin locally and cancel via their CLI

Whoops

Were you a bit too eager with your kicking off a deploy? Did you suddenly remember that embarrassing console.log you don’t really want the world to see?

There’s currently no way of cancelling builds through the heroku UI on dashboard.heroku.com .

How to do it

Install the heroku-builds plugin and cancel via the CLI.

# from the terminalheroku plugins:install heroku-buildsheroku builds:cancel -a app-name

Kevin McCarthy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store