Why firefox detects an error in the svg, but in chrome everything is OK?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Welcome, there is a need to display a svg background (dotted europe map) - bring him full code, thus:
background-color:#000000; background-image: url('data:image/svg+xml          ..../>');

(Full code here)
If you open the analyzed url in google chrome, everything is fine, but in firefox not so good:
XML Parsing Error: unclosed token....
Line Number 1, Column 537:

well, points to the supposedly unclosed tag path, which, as seen in the code, very closed.
And ff correctly displays the svg as a picture
here is the svg image
In chrome, again, the picture is displayed normally.
The assumption is following.
In order to minimize this svg, I use the simplest pattern, superimposed on a closed loop. Otherwise, if the output of each point - essentially a circle - the size of the file increases with 18-19 KB to 1MB or more. Hence the assumption that ff is not able or something differently interacts with the tag pattern in the body of svg.

Is there correct solution to this problem, no matter how, most importantly, to keep a small size?
Preferably also as different backgrounds for different browsers, ie would not load and to minimize the more and jpg, which is at a much worse quality and much larger in size?
by | 11 views

1 Answer

0 like 0 dislike
Adobe Illustrator 15.1.0, SVG Export Plug-In

Guarantee pile governmeni. So first you need to get rid of it, it is easiest to use: https://jakearchibald.github.io/svgomg/

And should specify the encoding:
background: url('data:image/svg+xml;utf8, ... ');

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
5 answers
asked Apr 9, 2019 by EgorWeb
110,608 questions
257,186 answers
35,431 users