TIL you can closely estimate the quality factor a JPEG was encoded with by looking at the AC table and doing some fairly simple maths.
as part of my blog generator I'm optimising images before publishing, so if I look at a JPEG and can see that it was already compressed below Q=85, I probably won't see enough of a size saving by re-encoding it down to Q=80 to justify the extra perceptual losses of a repeat encoding.