cms icon indicating copy to clipboard operation
cms copied to clipboard

Add key to `registerHtml`

Open brianjhanson opened this issue 8 months ago • 1 comments

Ensures the fetch call will only happen once per page load

brianjhanson avatar May 29 '25 20:05 brianjhanson

Are we seeing this happening in the wild? 😮 It's typically safe to use {% js %}, {% css %}, {% html %}, and the underlying craft\web\View "register" methods with the same strings multiple times… in each case, the fragments are held under md5 hashes of their content, which I would expect to be identical!

AugustMiller avatar Jun 10 '25 22:06 AugustMiller

It looks like you're right @AugustMiller! I didn't realize the register methods were so smart.

brianjhanson avatar Jun 16 '25 19:06 brianjhanson