C
Curtis
I have a page that I'm working on that uses an external SVG file multiple times via the
Is there any way that I can force the browser to skip these duplicate requests? Alternatively, is there a way to inline the separate SVG file for reuse and rework it to prevent the GET requests from being generated that way?
Continue reading...
<embed> tag and I've noticed that each instance triggers a separate GET request. The same issue also happens if I swap for an <iframe> or <object> tag. I can't inline the SVG because it needs to be accessible from multiple pages and for versioning purposes as well as the fact that I use the fragment identifier and a bit of JavaScript in the SVG to modify the exact contents at usage time based on what's passed in which I understand is only usable that way for separate files. On this page, I use this SVG 96 times which means it generates 96 GET requests all at once and then has to wait for the first to succeed and all the rest to return "304 Not modified" which would hammer the server a bit and on the user's end, ends up taking a few seconds for all the requests to complete despite the file in question being only 2Kb.Is there any way that I can force the browser to skip these duplicate requests? Alternatively, is there a way to inline the separate SVG file for reuse and rework it to prevent the GET requests from being generated that way?
Continue reading...