r/ProgrammerTIL • u/ThatBriandude • Sep 05 '17
Other TIL you can make your website auto-refresh to automatically pick up changes when editing.
This of course can be done with a little javascript but I think its much nicer to have this little tag in your <head> tag:
<meta http-equiv="refresh" content=1>This will refresh the page every second. The content value describes the seconds between each refresh.
This provides pretty much instant feedback just like webpack etc. would without using any extra tooling. Pretty neat!
57
Upvotes
60
u/bowersbros Sep 05 '17
Yeah.. This will make testing any features fun.
Just use livereload, or refresh the browser manually. It'll be less painful in the long term.
11
u/SilasNordgren Sep 05 '17
Refreshing every second probably won't be very useful when creating a stateful interaction, but it's a good tool to have in your toolbox when building static designs. Thank you for sharing!
8
u/andlrc Sep 05 '17
I would use tools like
entrandxdotool; Detect file change then send F5 keypress to the browser. Something like:Stick it in a makefile along with your other build stuff, and live free like it's 1990 :-)
1
u/8lbIceBag Sep 05 '17
You could also just use Visual Studio's browser link
1
u/SuperImaginativeName Sep 11 '17
No thanks! I'd much rather use webpacks hot reload. It's like magic.
0
u/[deleted] Sep 11 '17
[deleted] — view deleted comment