Turnkey reload automatically on script change or style change
This page was created by Hans.karlsen on 2019-06-16. Last edited by Edgar on 2025-01-20.
When developing html5 components or styles for MDriven Turnkey using the Turnkey core prototyper, you can make a simple change so that it reloads on every discovered source change (CSS or javascript).
Simply paste this script in the /Views/Shared/_Layout.cshtml:
<script type="text/javascript" src="http://livejs.com/live.js"></script>
This will do HEAD requests to ask the server for changes all the time, but only reload the page when a change is reported.
It is not a good idea to have this on the server - but it is great to have while you develop.