{"id":709,"date":"2011-01-28T16:30:39","date_gmt":"2011-01-28T16:30:39","guid":{"rendered":"https:\/\/copyright.lboro.ac.uk\/lorls\/?p=709"},"modified":"2011-01-28T16:30:39","modified_gmt":"2011-01-28T16:30:39","slug":"ajax-performance-boosts","status":"publish","type":"post","link":"https:\/\/blog.lboro.ac.uk\/lorls\/lorls\/ajax-performance-boosts","title":{"rendered":"AJAX performance boosts"},"content":{"rendered":"<p>Just recently I have been looking at tweaks that I can make to improve the performance of CLUMP. \u00a0Here are the ones that I have found make a difference.<\/p>\n<p>Set up apache to use gzip to compress things before passing them to the browser. \u00a0It doesn&#8217;t make much difference on the smaller XML results being, but on the large chunks of XML being returned it  reduces the size quite a lot.<\/p>\n<p>Here is an extract of the apache configuration file that we use to compress text, html, javascript, css and xml files before sending them.<\/p>\n<pre><code># compress text, html, javascript, css, xml:\nAddOutputFilterByType DEFLATE text\/plain\nAddOutputFilterByType DEFLATE text\/html\nAddOutputFilterByType DEFLATE text\/xml\nAddOutputFilterByType DEFLATE text\/css\nAddOutputFilterByType DEFLATE application\/xml\nAddOutputFilterByType DEFLATE application\/xhtml+xml\nAddOutputFilterByType DEFLATE application\/rss+xml\nAddOutputFilterByType DEFLATE application\/javascript\nAddOutputFilterByType DEFLATE application\/x-javascript<\/code><\/pre>\n<p>Another thing is if you have a lot of outstanding AJAX requests queued up and the user clicks on something which results in those requests no longer being relevant then the browser will still process those requests.  Cancelling them will free up the browser to get straight on with the new AJAX requests.<\/p>\n<p>This can be very important on versions 7 and below of Internet Explorer which only allow 2 concurrent connections to a server over http1.1.  If the unneeded AJAX requests aren&#8217;t cancelled and just left to complete then it can take Internet Explorer a while to clear the queue out only processing 2 requests at a time.<\/p>\n<p>The good news is that Internet Explorer 8 increases the concurrent number of connections to 6, assuming that you have at least a broadband connection speed, which brings it back into align with most other browsers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just recently I have been looking at tweaks that I can make to improve the performance of CLUMP. \u00a0Here are the ones that I have found make a difference. Set up apache to use gzip to compress things before passing them to the browser. \u00a0It doesn&#8217;t make much difference on the smaller XML results being, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[8,9,3],"tags":[11,41,61],"class_list":["post-709","post","type-post","status-publish","format-standard","hentry","category-bibgrab","category-clump","category-lorls","tag-ajax","tag-javascript","tag-performance","count-0","even alt","author-lbjlclboro-ac-uk","last"],"_links":{"self":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/posts\/709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/comments?post=709"}],"version-history":[{"count":0,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/posts\/709\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/media?parent=709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/categories?post=709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/tags?post=709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}