Commit graph

10 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
218fceac35 livereload: Add missing GoDoc 2016-03-24 14:05:08 +01:00
Anthony Fok
ea75985c7d Update embedded livereload.js to 2.2.1 in livereload.go
Also add a copyright notice, download URL and the ugliflyjs command
used to update the livereloadJS variable.
2015-12-22 16:21:03 -07:00
Bjørn Erik Pedersen
e445c35d6a Fix copyright headers in source files
Still need to add some missing headers and an AUTHORS file.

See #1646
2015-12-07 19:57:01 +01:00
Steve Francia
f045d7a611 Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
bep
81c41d6f20 livereload: apply some Golint rules 2015-03-07 12:58:51 +01:00
bep
ba53799fdb url_path => urlPath 2015-01-30 16:21:46 +01:00
Dan Hersam
523f38a9a8 Fix for issue 839 and 490 on Windows
The paths were seen as changed but not static because of the backslashes in
ev.Name. Once the backslashes were added, I discovered that the JSON
sent to livereload was invalid and failed to work because it had backslashes.

Hence the code to replace the backslashes from the path to make them work
in JSON and for the URL.

With this fix, changes to a stylesheet are shown on the page, and if it's a
single file that changed, it's reflected in the browser without reloading the whole
page.
2015-01-30 14:18:17 +01:00
bep
24bbfe7d32 Set Content-Type for livereload.js
The Content-Type was not set for livereload.js and was interpreteted by the browser as text/plain.

This commit sets it to application/javascript.

Fixes #562
2014-10-15 12:45:29 -04:00
bep
df489b4712 Enable soft livereload of CSS and images
Prior to this commit a dummy JavaScript filename was sent to LiveReload when changing a static file (CSS, image etc.), forcing a full browser reload of the page.

This commit fixes this by sending the relative file path of the changed static resource, enabling partial live reloading for CSS- and image-changes. If more than one static file happens to end up in the same changeevent-batch, it will fall back to do a full refresh. To enable this logic, the change events with names ending with ".goutputstream*" is now filtered out as temporary.

Changes in dynamic content behaves like before.

Issue #490
2014-09-11 16:58:06 -04:00
spf13
be1ee22032 Proper integration of live reload with automatic injection 2014-05-16 17:49:27 -04:00