I suggest you ...

Why reading Script from external source

Hi,
I just had a look at the code snipped that have to be included. I wonder why this script have to read an additional script from an external server? I think, as I'm already serving a large JS file (also using CloudFront), I could easily add that script too. On the other hand, if no errors occur on the client side, deferring the loading of that script would save a http request.

1 vote
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Torsten Robitzki shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • AdminRakesh Pai (Founder, Errorception) commented  ·   ·  Flag as inappropriate

    Hi Torsten,

    The main reason to have the JS file hosted is so that I can roll out bug-fixes and new features without everyone having to upgrade. This is the same as say Google Analytics' code being hosted so that feature rollout can be done without any installation/upgrade effort at your end.

    About deferring the load: The JS file is already downloaded out-of-band, and doesn't affect your page-load time one bit. The worst case scenario with the additional HTTP request is if the browser hits a bottleneck with HTTP connections, which is very rare especially after page load is complete. (Errorception's code loads after page load.) Deferring the loading will also complicate the code snippet that needs to be included in the markup. You'd typically want to do as little as possible in these kinds of snippets so that the bulk of the code can be improved iteratively. The current setup is a balance between lazy-loading the script, the amount of code in the snippet, and making as much of the code as possible serviceable later.

Feedback and Knowledge Base