Keep the Dev Tools opend , and refresh your page to check if your new code works.
" $url = "https://$tenant.sharepoint.com/sites/$scurl/" ## Set some values $Source Directory = 'C:\View Models\' $scurl '\' $files = Get-Child Item $Source Directory -Recurse Now let’s connect to the tenant.
In that directory, I created a directory for each site collection I want to add view models to.
In those directories, I put my view model HTML-files.
adapted from: I've had this problem before, it's very frustrating but I found a work around. This will make sure your browser always reloads the file, because it thinks it's a different file because of the random number in the url.
The server will always return the file and ignore what comes after the '? A little late to the party, but if you put this in your html, it will keep your website from updating the cache.
For a recent deployment, I even automated adding the Web parts to the pages, but I’ll cover that in a future blog. To make this process a bit more automated and to save time, I created a Power Shell script.
When working with view models, I normally edit the HTML file, change some Java Script, upload the file and check the file in. I created a work directory where I placed the script.
At the end of the script, don’t forget to disconnect using the following cmdlet.
You can use these techniques as a pretty easy way to update or add files to your style library.
this does not happen in IE, and I don't use firefox so I can't tell if it would happen there.
is chrome for some reason caching my runs and not loading them in on each run? In the Dev Tools panel , click the Setting button in the top right . Check the Disable cache (while Dev Tools is open) 4.
In this loop, I check out the existing file, upload the more recent file and I check the file in.