jeudi 12 janvier 2017

Append file md5 hash to url in PHP

I want't to append md5 hash to css and js files to able to long-term cache them in browser.

In Python Django there is a very easy way to do this, static template tag http://ift.tt/2jmlx4R

I'd like a library that does exactly the same thing in PHP, including generating the hashes at build time, not runtime.

I've seen an old same question on SO: hash css and js files to break cache. Is it slow? , but it never got an answer about how to do the md5 hash, so I'm asking again.




Aucun commentaire:

Enregistrer un commentaire