some pages that use macros like:
topusers or popularlabels
are really slow to load. Is there any way to have this load asynchronously through ajax instead of having this block the initial page load ?
some pages that use macros like:
topusers or popularlabels
are really slow to load. Is there any way to have this load asynchronously through ajax instead of having this block the initial page load ?
The Future macro is absolutely 100% the best way to do this.
We use it massively on a Confluence 2.10.3 instance to speed up everything, but I haven t tested it with more recent versions.
https://labs.atlassian.com/wiki/display/FUTURE/Home
I made a little video showing it working - reaching out to a SharePoint server to render a document list. This is not a perfect demo but gives you an idea of what it does.
I made a video of this too, but don t have the StackOverFlow rep to post it here yet so here is part of the URL screencast.com/t/tz8xdSCQYxp
Brendan
If you consider using jQuery library, it has build-in support for asynchronous ajax requests.
Maybe google analytics approach will help you.
(function() {
var delayed = document.createElement( script );
delayed.type = text/javascript ;
delayed.async = true;
delayed.src = URL_AD_SERVER ;
(document.getElementsByTagName( head )[0] || document.getElementsByTagName( body )[0]).appendChild(delayed);
})();
However, I don t know how will work for dependencies :)
Really all you need to do is postpone the loading until after the page has loaded. To do that, you can make a javascript function that sets the script tags of what you are loading and then when the body is done loading, call this function. You can do that by:
function loadConfluence() {
var ads = document.createElement( script );
ads.async = true;
ads.src = your_ad_url ;
return document.getElementsByTagName( body )[0].appendChild(ads);
};
window.onload = loadConfluence();
This code will wait until the page is fully loaded and then call the function to load your ads.
I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...
I m trying to find a reusable way to set focus from one text box to another upon enter using ASP.NET, but using client-side JavaScript to do so. The only reason I mention this is to be done in ASP....
I have some Javascript JQuery code that does an Ajax call to the server every 5 mins, it s to keep the server session alive and keep the user logged in. I m using $.ajax() method in JQuery. This ...
Why are my AJAX requests failing? I have a website www.foo.com, and I m running Tomcat on the same server, www.foo.com:8080/services. However, when a file on foo.com makes an ajax call as such: $....
I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...
I have a entry form. Below it, I want to show a grid containing existing records. As the user clicks on a row of the grid, the values must get filled in the fields of the form above. Is there any way ...
I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...
Ok, I m stumped. Basically, this script works fine in FF, but not in IE (6,7 or 8) - in which it returns an "Object doesn t support this property or method" error. Any ideas?: function ...