want to implement a static resource update on your own, automatically calculate the md5 value rename, publish it to the static resource server, and rewrite the script for the related tags in the html. I probably imagined that there are several problems now.
-
static file server and dynamic server may have many, and not in a computer room, then this tool, must do a notification system, the changed js
css ah published to the static server, rewrite the tag of the html file published to the dynamic server, this step is based on the network protocol, let the static server listen for a port waiting for the arrival of notifications and file transmission, reliable?
This may happen when -
this script overwrites the tag loaded by the resource in html, which loads 1.cssjce1.css and then loads another jpg in html. If the jpg changes at this time, it will cause all 1.css and html to change. So be sure to calculate the md5 from the bottom and replace the tag. Is there any good way to deal with this hierarchical relationship?
-
this question is not about this script. I just want to ask a tool like browserSync, which can refresh the page automatically after the resource ctrl
s is saved. How does this resource monitoring (watching
file in gulp) be done? Is to write a timer infinite loop calculation file md5?
I hope that the seniors who have done it will answer it. Thank you very much.