3

I'm using google swiffy, and it require to embed "runtime.js". which is very huge file... size about 410KB.

I'm using v7.3.0 version... Is there any earlier smaller versions... or other alternatives.

Thanx

almoujtahed
  • 163
  • 11

1 Answers1

0

You don't need to embed runtime.js - just link to it from your html, like this:

<script src="https://www.gstatic.com/swiffy/v7.3.0/runtime.js"></script>

That link should already be in your swiffy HTML file.

But, if by "embed" you meant "link to", Google's servers deliver the runtime fast, so the size shouldn't be an issue. But if it is, you could try linking to an older, smaller version of the runtime (e.g. version 5.2.0 is 280K). But then, an older version might not render your swiffy correctly.

plugincontainer
  • 630
  • 2
  • 9
  • 28
  • Thank you if I link runtime.js to google servers and didn't embedded it like this Do you think it wont affect loading time noticeably, specially I'm using JavaScript loader and my site wont show until all libraries are loaded – almoujtahed Aug 18 '15 at 08:04