问题
I've hosted a website on azure and right now I am deploying on a test slot and I have a problem after each deployment and if I haven't accessed the pages in a long time. Each page loads like 15 seconds and if accessed again loads in normal time. I changed the settings in the portal to keep the site always alive, but that doesn't work as expected. Tried with ping to the website every few minutes, but did not work again.
I thought the build is only once for the whole application, but it looks like that every file is built on-the-go. I am not sure how to fix that, or if it's even what I think it is.
回答1:
The pages will build and cache the first time you access any given page (not once for the whole site) right after deployment. If you have public pages, you can also look at Application Initialization options in the web.config to do the "warm up" for you.
来源:https://stackoverflow.com/questions/36333016/azure-website-each-page-loading-slow