Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Preload an SVG during application load

$
0
0

@philipdring wrote:

Hi,

I have a page whose typescript file loads the content of a large SVG into a DIV in the html using jQuery’s .load function.

The SVG is several thousand lines and 293Kb; it takes 2 seconds to load on an iPhone 7 and 15 seconds to load on a cheap Android phone. The function is called with this.loadMap(); in ionViewDidLoad(). The whole process is executed every time the page is reloaded.

Is there any way to preload the SVG during the loading of the application itself and then have the content of the file instantly available whenever the user goes to the map page?

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>