Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gauravk Posted November 18, 2018 Posted November 18, 2018 Any tips on how to speed up IPB sites based on 8 most pressing issues?
opentype Posted November 18, 2018 Posted November 18, 2018 I would consider that chart completely useless without data or observation how your site actually performs. That chart doesn’t show that. How fast does your server respond? When does it start rendering? When it it finished? How much useful information is shown to the user while that is happening? That is what matters. Going by just the graph and what is easily feasible: 1. Why are there redirects? I would check that out. 2. Browser caching. You absolutely want to have that and it can usually be solved with a few lines in the htaccess file. Gauravk 1
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Thanks for your suggestions, I tried adding below lines in htaccess and it jumped from 52-60. Still few files are not leveraging browser cache, any clue how I can add those specific files in htaccess? What's this mean? Leverage browser caching for the following cacheable resources: https://certify-js.alexametrics.com/atrk.js (expiration not specified) https://www.googletagmanager.com/gtag/js?id=AW-1008337630 (15 minutes) https://www.googletagmanager.com/gtag/js?id=UA-128905188-1 (15 minutes) https://www.googletagmanager.com/gtag/js?id=UA-24486642-1 (15 minutes) https://connect.facebook.net/en_US/fbevents.js (20 minutes) https://connect.facebook.net/signals/config/1686597891555087?v=2.8.33&r=stable (20 minutes) https://translate.googleapis.com/translate_static/css/translateelement.css (1 hour) https://translate.googleapis.com/translate_static/js/element/main.js (1 hour) https://www.googleadservices.com/pagead/conversion_async.js (1 hour) https://www.google-analytics.com/analytics.js (2 hours) <IfModule mod_expires.c> ExpiresActive On # Images ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/x-icon "access plus 1 year" # Video ExpiresByType video/mp4 "access plus 1 year" ExpiresByType video/mpeg "access plus 1 year" # CSS, JavaScript ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" # Others ExpiresByType application/pdf "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" </IfModule>
Jim M Posted November 18, 2018 Posted November 18, 2018 Caching of external resources is not something that you can control 😉 sobrenome and Gauravk 2
Adlago Posted November 18, 2018 Posted November 18, 2018 34 minutes ago, Gauravk said: Any tips on how to speed up IPB sites based on 8 most pressing issues? Result of several quick tests 1. Many validation errors html5 https://validator.w3.org/nu/?doc=https%3A%2F%2Fcarnity.com%2F 2. Errors in validation CSS Level 3 http://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fcarnity.com%2F&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=bg 3. Complete report of resources in your site. Each row with a click shows more information. https://yellowlab.tools/result/f6sg7azukt 4. For a GtMetrix report - you use a cloudflare - this makes analysis difficult. Perhaps it is good to stop a cloudflare, to do a good optimization of everything your site uses, then to activate cloudflare. 5. Also, see Lighthouse report your performance. Gauravk and sobrenome 2
opentype Posted November 18, 2018 Posted November 18, 2018 9 minutes ago, Gauravk said: Leverage browser caching for the following cacheable resources: I would think about which of these external services you actually need. Gauravk and sobrenome 2
TDBF Posted November 18, 2018 Posted November 18, 2018 (edited) 1 hour ago, Gauravk said: Any tips on how to speed up IPB sites based on 8 most pressing issues? Use a free CDN service such as Cloudflare, configure it and that should take care of most of your issues which are not image related.. For defer parsing of Javascript. Login into your ACP, go to your default theme and under Custom, change JavaScript include location to Just before body tag. Edited November 18, 2018 by TDBF Gauravk 1
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Thanks guys, any clue how I can defer these JS? 712.6KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering. https://carnity.com/uploads/javascript_global/root_framework.js.2c1df26bc3ce52d14993b95aa851b8ce.js?v=f784364853 (284.6KiB) https://carnity.com/uploads/javascript_global/root_library.js.8af6b9e14227f7f0fa82c327c37a01f7.js?v=f784364853 (228.0KiB) https://carnity.com/uploads/javascript_global/root_front.js.261c035daeb38e5e6665575667361174.js?v=f784364853 (73.9KiB) https://carnity.com/uploads/javascript_featuredcontent/front_front_slider.js.cdc8c19081499020223136806f6da968.js?v=f784364853 (43.6KiB)
Adlago Posted November 18, 2018 Posted November 18, 2018 47 minutes ago, Gauravk said: Thanks guys, any clue how I can defer these JS? 712.6KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering. https://carnity.com/uploads/javascript_global/root_framework.js.2c1df26bc3ce52d14993b95aa851b8ce.js?v=f784364853 (284.6KiB) https://carnity.com/uploads/javascript_global/root_library.js.8af6b9e14227f7f0fa82c327c37a01f7.js?v=f784364853 (228.0KiB) https://carnity.com/uploads/javascript_global/root_front.js.261c035daeb38e5e6665575667361174.js?v=f784364853 (73.9KiB) https://carnity.com/uploads/javascript_featuredcontent/front_front_slider.js.cdc8c19081499020223136806f6da968.js?v=f784364853 (43.6KiB) This <div id="google_translate_element"> provokes your defer parsing. Move it before the JavaScript code for loading, along with the google translate script. Gauravk 1
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Thanks @Adlago I have moved both foxpush and google translate script in the head, but still showing the same results Defer parsing of JavaScript F (43) JS HIGH What's this mean? 712.6KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering. https://carnity.com/uploads/javascript_global/root_framework.js.64fe6b9b91db1accd2cdbc4ddd77f5d8.js?v=f784364853 (284.6KiB) https://carnity.com/uploads/javascript_global/root_library.js.153881d3f7ae333986706aae043c6312.js?v=f784364853 (228.0KiB) https://carnity.com/uploads/javascript_global/root_front.js.d5deb364632f8f09d3a104cccf239481.js?v=f784364853 (73.9KiB) https://carnity.com/uploads/javascript_featuredcontent/front_front_slider.js.f97583bf5713b5d8b27286a68cfb8a73.js?v=f784364853 (43.6KiB)
Adlago Posted November 18, 2018 Posted November 18, 2018 1 minute ago, Gauravk said: Thanks @Adlago I have moved both foxpush and google translate script in the head, but still showing the same results Defer parsing of JavaScript F (43) JS HIGH What's this mean? 712.6KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering. https://carnity.com/uploads/javascript_global/root_framework.js.64fe6b9b91db1accd2cdbc4ddd77f5d8.js?v=f784364853 (284.6KiB) https://carnity.com/uploads/javascript_global/root_library.js.153881d3f7ae333986706aae043c6312.js?v=f784364853 (228.0KiB) https://carnity.com/uploads/javascript_global/root_front.js.d5deb364632f8f09d3a104cccf239481.js?v=f784364853 (73.9KiB) https://carnity.com/uploads/javascript_featuredcontent/front_front_slider.js.f97583bf5713b5d8b27286a68cfb8a73.js?v=f784364853 (43.6KiB) Not in the head, Move it bottom global template, before {template="includeJS" if="theme.js_include == 'footer'" app="core" group="global" location="global" params=""} {template="viglink" if="settings.viglink_enabled" app="core" group="global" params=""}
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 I moved it in the footer just above theme.js like you said and still no difference 939.3KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering. https://carnity.com/uploads/javascript_global/root_framework.js.0a4882690beb6fe5ebf1c1575ee6dfe5.js?v=f784364853 (284.6KiB) https://carnity.com/uploads/javascript_global/root_library.js.8562fd6feef52021610134fd9785adcf.js?v=f784364853 (228.0KiB) https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-8184112565942941&output=html&h=90&slotname=5724575297&adk=1860262727&adf=22282543&w=970&lmt=1542563732&guci=2.2.0.0.2.2.0.0&format=970x90&url=https%3A%2F%2Fcarnity.com%2F&flash=0&wgl=1&adsid=NT&dt=1542563732440&bpp=48&bdt=1313&fdt=181&idt=173&shv=r20181107&cbv=r20180604&saldr=aa&abxe=1&correlator=6415190580397&frm=20&pv=2&ga_vid=438560726.1542563733&ga_sid=1542563733&ga_hid=970941993&ga_fc=0&iag=0&icsg=41635&dssz=16&mdo=0&mso=0&u_tz=-480&u_his=2&u_java=0&u_h=858&u_w=1367&u_ah=858&u_aw=1367&u_cd=24&u_nplug=4&u_nmime=5&adx=43&ady=223&biw=1366&bih=768&scr_x=0&scr_y=0&eid=4089040%2C10573697%2C21060853&oid=3&rx=0&eae=0&fc=656&brdim=0%2C0%2C0%2C0%2C1367%2C0%2C1366%2C857%2C1366%2C768&vis=1&rsz=%7C%7CeE%7C&abl=CS&ppjl=f&pfx=0&fu=16&bc=13&osw_key=404835957&ifi=1&uci=1.hqxc1k3cxhjb&fsb=1&xpc=0fLNdUWIXo&p=https%3A//carnity.com&dtd=228 (115.4KiB of inline JavaScript) https://carnity.com/uploads/javascript_global/root_front.js.ef75df97f90af64b7a11beea5f692b44.js?v=f784364853 (73.9KiB) https://tpc.googlesyndication.com/pagead/js/r20181107/r20110914/activeview/osd_listener.js (69.7KiB) https://carnity.com/uploads/javascript_featuredcontent/front_front_slider.js.0f560d81fc167c2e002fbe09bc3403ca.js?v=f784364853 (43.6KiB)
Adlago Posted November 18, 2018 Posted November 18, 2018 Now you have placed between the footer closures and the div id elMobileDrawer That's wrong. When there is a html code between a JavaScript, it causes a deferring parsing. Gauravk 1
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Sorry for my code ignorance. So should I place it after </body> and before </html>?
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Apology for the confusion, I have placed it just above the includJS line but in my codes, I couldn't find guestTermsBar. Please check if its fine? 2 hours ago, TDBF said: Use a free CDN service such as Cloudflare, configure it and that should take care of most of your issues which are not image related.. 1 I am using the cloudflare paid and unpaid version for two years. 2 hours ago, TDBF said: For defer parsing of Javascript. Login into your ACP, go to your default theme and under Custom, change JavaScript include location to Just before body tag. 1 You mean in globaltemplate right....? I have moved all 7 except 1 JS before the </body> and still defer message shows up.
Adlago Posted November 18, 2018 Posted November 18, 2018 4 minutes ago, Gauravk said: Apology for the confusion, I have placed it just above the includJS line but in my codes, I couldn't find guestTermsBar. Please check if its fine? Now it's in the right place, but change the code. Now your code loads like this <script type="text/javascript" data-cfasync="false"> var _foxpush = _foxpush || []; _foxpush.push(['_setDomain', 'carnitycom']); (function(){ var foxscript = document.createElement('script'); foxscript.src = '//cdn.foxpush.net/sdk/foxpush_SDK_min.js'; foxscript.type = 'text/javascript'; foxscript.async = 'true'; var fox_s = document.getElementsByTagName('script')[0]; fox_s.parentNode.insertBefore(foxscript, fox_s);})(); </script> <div id="google_translate_element"></div><script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'ar', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL}, 'google_translate_element'); } </script> Do it this way <div id="google_translate_element"></div><script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'ar', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL}, 'google_translate_element'); } </script> <script type="text/javascript" data-cfasync="false"> var _foxpush = _foxpush || []; _foxpush.push(['_setDomain', 'carnitycom']); (function(){ var foxscript = document.createElement('script'); foxscript.src = '//cdn.foxpush.net/sdk/foxpush_SDK_min.js'; foxscript.type = 'text/javascript'; foxscript.async = 'true'; var fox_s = document.getElementsByTagName('script')[0]; fox_s.parentNode.insertBefore(foxscript, fox_s);})(); </script> Or, move the first script here after the second
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Thanks, please check if all pasted correctly? Just wondering what is this wait time.....? And how can I speed it, its a xeon dedicated server with 32 GB ram
Adlago Posted November 18, 2018 Posted November 18, 2018 Yes, it's fine now. And there is no longer a defer parsing and first byte is OK
Gauravk Posted November 18, 2018 Author Posted November 18, 2018 Thanks Adlago for all your great help, really appreciate it. I have switched on all possible caching options in cloudflare and changed IPB datastore from file to MySQL cache even as this page load and wait was really disturbing. Also Im in a process now to get Memcached or Redis install on the server and facing some issues with extension installation. Just curious to know in case I fail, MySQL caching is better than the file system, right....?
Adlago Posted November 18, 2018 Posted November 18, 2018 14 minutes ago, Gauravk said: Just curious to know in case I fail, MySQL caching is better than the file system, right....? If you using Memcached or Redis - MySQL Database storage method provides the best performance. If your caching method is "No caching" - use you for Data Storage Method - File System. sobrenome 1
Silnei L Andrade Posted November 19, 2018 Posted November 19, 2018 Install Redis and Cloudflare that will greatly improve. From the rest is to wait for version 4.4 that will solve the issue of images Gauravk 1
Gauravk Posted November 19, 2018 Author Posted November 19, 2018 Im desperately waiting for images issue to be solved - reported so many times already. To delete enormous size images that slow down server To serve optimize images that is compressed and use lossless compression. Guys yesterday I turned every possible option in cloudflare and saw improvement, but after that my site loads in textual format in IE (edge), chrome was fine though. So slowly have to disable many cloudflare options to get back the site and now will turn one option at a time to see what causes site to load so funny Adlago, once I turned off cloudflare those options, defer issue is back (sadly).
Gauravk Posted November 19, 2018 Author Posted November 19, 2018 Things I switched on that showed improvement and then switched off due to site loading like a plain text in IE are below. Any guess, which could be the main culprit....? Brotli Speed up page load times for your visitor’s HTTPS traffic by applying Brotli compression. Rocket Loader™ Improve the paint time for pages that include JavaScript. Mobile Redirect Redirect visitors that are using mobile devices to a mobile-optimized website. Enable Accelerated Mobile Links Beta Enable Accelerated Mobile Links to enhance your mobile visitor’s experience for external content. Accelerated Mobile Links allow your users to open external AMP links from your website in AMP. AMP makes your website’s mobile experience at least three times faster than normal. Workers Run JavaScript Service Workers in Cloudflare’s 150+ data centers around the world. Modify a site’s HTTP requests and responses, make parallel requests, or generate responses from the edge.
Adlago Posted November 19, 2018 Posted November 19, 2018 If you've turned on Cache page output for guests , turn it off. sobrenome 1
Recommended Posts