empty cache and hard reload in typescript

Job ID: 31693883

Budget: $10 – $30 USD

hi
often times i need to do a "empty cache and hard reload" in my site
i dont want to do f12
but rather have a button that does the same thing
ive tried
location.reload(true);
window.history.forward()
but no luck
i also tried sending "Clear-Site-Data" from the server, but still all my css's and js's are still cached. and i still need to manually to f12>"empty cache and hard reload"

i need u to write a typescript function that imitates precisely what the "empty cache and hard reload" does in chrome (clears all images/assets from this site out of the cache)
thanks
Related categories: Typescript