Create version of page based on hashing page html
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

Would like to be able to include a js function on a page that will hash all of the page contents and come up with a hash value for what it has hashed. We would like to append this value to a normal readable version number on the page like

Version 1.1.{hash}

we will use this to help a bit with stale browser states and debugging users that avoid refreshes. this should hash all of the meta and any external resource urls (doesnt need to hash actual remote js/css contents unless that is pretty easy)

awarded to Wuddrum
Tags
javascript

Crowdsource coding tasks.

1 Solution

Winning solution

Hey, something like this? https://jsfiddle.net/Wuddrum/9uksj50h/3/

Edit: Changed the hash to hex value and it's now always positive.

Based on https://stackoverflow.com/a/7616484
Wuddrum 8 months ago