Post by OC2PS » Mon Apr 08, 2013 12:41 pm

Affiliate Widget Generator is a fantastic module.

Suggestions to developer:

1. Include a vqmod to add a link to the affiliate account menu. Yes, it's simple enough for many people to do, but for many others, it's not that obvious.

2. The problem is, how do you load an external javascript with minimal impact on your affiliates’ sites? The download of my script should not block the download of any script on their sites. If my site is temporarily slow, I don’t want to block the onload event from triggering until after our site responds. Any events used should not override any events on the customer’s site.

So, asynchronous load, lazy load, don't block onload, e.g.

Code: Select all

(function() {
    function async_load(){
        var s = document.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        s.src = 'http://yourdomain.com/script.js';
        var x = document.getElementsByTagName('script')[0];
        x.parentNode.insertBefore(s, x);
    }
    if (window.attachEvent)
        window.attachEvent('onload', async_load);
    else
        window.addEventListener('load', async_load, false);
})();

OC2PS
OC 3.0.3.7, vQmod 2.6.2, Journal3 theme
Arcfesték, Csillámtetoválás, Henna
Image
Check out: All my extensions | My FREE extensions


User avatar
Active Member

Posts

Joined
Wed Jul 22, 2009 4:15 am
Location - Hungary

Post by Vali_REK » Mon Oct 28, 2013 4:56 am

Can you explain please ?

Newbie

Posts

Joined
Fri May 18, 2012 3:50 am
Location - Oltenita
Who is online

Users browsing this forum: No registered users and 10 guests