prepare a JS refresh in JS