Turnkey reload automatically on script change or style change
No edit summary
(Automatically adding template at the end of the page.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When you develop 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).
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 in this script in the /Views/Shared/_Layout.cshtml:
Simply paste this script in the /Views/Shared/_Layout.cshtml:
  <script type="text/javascript" src="http://livejs.com/live.js"></script>
  <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.
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 super great to have while you develop.
It is not a good idea to have this on the server - but it is great to have while you develop.
[[File:2019-06-16 12h34 23.png|none|thumb|942x942px]]
[[File:2019-06-16 12h34 23.png|none|thumb|942x942px]]
[[Category:MDriven Turnkey]]
[[Category:MDriven Turnkey]]
{{Edited|July|12|2024}}

Latest revision as of 15:48, 10 February 2024

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.

2019-06-16 12h34 23.png
This page was edited 101 days ago on 02/10/2024. What links here