Open Duncank opened 6 years ago
Having the same issue.
// <-- For SVG support
if ('WebSocket' in window) {
(function () {
function refreshCSS() {
var sheets = [].slice.call(document.getElementsByTagName("link"));
var head = document.getElementsByTagName("head")[0];
for (var i = 0; i < sheets.length; ++i) {
var elem = sheets[i];
head.removeChild(elem);
var rel = elem.rel;
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
var url = elem.href.replace(/(&|\?)_cacheOverride=\d+/, '');
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
}
head.appendChi
Any chance to merge pull request https://github.com/tapio/live-server/pull/279 fixing this issue?
Found out this issue after 2 hours searching why some of my SVG, embedded via , were broken and some not.
I see this issue is still not resolved? Is it such a big issue to fix the RegExp? I solved it now by removing the SVG regexp check from my local live-server.js file.
I have the same issue, half my page is missing when I use >2 SVGs in it
Issue description
When running a live-server for my webapp, some .html files containing inline svg's are not returned completely.
This is the command I use to start the server:
live-server www/ --port=1234 --entry-file=index.html
. The index.html (also with inline svg's) is delivered correctly, but I use ajax-requests to get html-files in the /pages/-folder and they return incomplete, with some injected websocket code by live-server around the svg-parts:This is my schools.html in the folder:
This is the same file in Chrome's network-response-tab:
As you can see, the returned code is cutoff and the injected code (almost) appears twice, breaking my app.
Using the --no-css-inject option doesn't change this.
Software details
Basic .html & .js
live-server
:live-server
version: 1.2.0