Created
October 8, 2020 22:49
-
-
Save danparker276/5575b5d7307cae4e607497dc17046a00 to your computer and use it in GitHub Desktop.
Powershell Add Cache-Control to Azure Storage Index.html for Static Website on JAM stack for example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I run this on azure devops after I deploy my javascript app (react, vue...) to an azure storage website | |
#Make sure your index.html calls your compiled javascript file that has a unique or build name and you won't need | |
#your customers to have to hard refresh their browsers to get updates. | |
#Note this assumes a common Azure Static website deploy, I haven't found good docs on how to do this | |
az storage blob update --account-name <storageAccount> --account-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ== --container-name "`$web" --name "index.html" --content-cache-control "max-age=100" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment