{"id":1838,"date":"2016-11-29T13:20:34","date_gmt":"2016-11-29T19:20:34","guid":{"rendered":"http:\/\/alliwalk.com\/blog\/?p=1838"},"modified":"2016-11-29T13:21:42","modified_gmt":"2016-11-29T19:21:42","slug":"webportfolio-update-part-2-performance","status":"publish","type":"post","link":"https:\/\/alliwalk.com\/blog\/2016\/11\/webportfolio-update-part-2-performance\/","title":{"rendered":"Web\/Portfolio Update &#8211; Part 2: Performance"},"content":{"rendered":"<p>Currently finished with the 90% of the HTML\/CSS of my website. I found this great free photograph to use in the main image section of the site. (Looks so classy.) I need to post some of the portfolio image alternatives I came up, but decided not to use.<\/p>\n<p>This post is all about site performance optimization, what I did and what I learned. (That big, fat, red F in my cover image is explained below!)<\/p>\n<p><strong>Getting Started<\/strong><br \/>\nI wasn&#8217;t initially set on improving the performance of my site. (It&#8217;s only 1 page.) But, remembering all my lessons on Treehouse, I decided to minify some files anyway, like a pro. For CSS minification, here&#8217;s a nice simple site for that: cssminifier.com. This site also has a js minifier and image optimizers. In addition to working on my style.css file, I went through and deleted unnecessary classes for my font-awesome css file, and minified the CSS, since I only needed about 12 icons. (I&#8217;ve since added a few\u00a0back.) I also minified the smoothscroll.js file, which gives my site that, you know, smooth scroll effect. It&#8217;s a pretty short file, but it doesn&#8217;t hurt.<\/p>\n<p>Before I used cssminifier.com, I also took it through a clean CSS filter on http:\/\/www.website-performance.org\/ to <em>prettify<\/em>* my style.CSS file before minifying it. While I was there, I also decided check out the site performance. Ouch! Some big issues, especially with compressing images, including my new classy photo. This is where I got started on improving site performance.<\/p>\n<p><strong>Optimizing Files<\/strong><br \/>\nTwo\u00a0big problems were\u00a0too many CSS calls and images that were not optimized. I realized that I needed to link to some CDNs to reduce CSS calls. Instead of including the jQuery.js, Bootstrap.js, and Bootstrap CSS files, I&#8217;m now linking to the the files via CDN. I tried using one of the above websites to optimize my images, and also convert some of them to PNGs, but the server couldn&#8217;t handle it. So I used good, old Photoshop.<\/p>\n<p><strong>&#8220;Gzip Compression&#8221;<\/strong><br \/>\nI did not know what this term meant, but I got an F from a few site performance websites. <a href=\"https:\/\/gtmetrix.com\/enable-gzip-compression.html\" target=\"new\">GTMetrix<\/a> explains that using a compressed, zip, file will save a lot of space. But it&#8217;s up to the browser to decide which file to use. GTMetrix and Website-Performance.org both suggested compressing my styles.ccs, bootstrap.css, and font-awesome.min.css files. Well, since I&#8217;m going to be using a CDN for the Bootstrap and jQuery files, I&#8217;m not too concerned about those. But I did continue as it advised for the relevant files.<\/p>\n<p>Having done all this, I am happy my site loads fast, especially on mobile. And a learned a lot, not just from these websites, but also about the tools I used to complete them. For instance, Cyberduck, an\u00a0FTP-transfer client doesn&#8217;t show .htaccess files, but Filezilla does.<\/p>\n<p><strong><a href=\"http:\/\/alliwalk.com\/blog\/wp-content\/uploads\/2016\/11\/site_optimization2.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1915\" src=\"http:\/\/alliwalk.com\/blog\/wp-content\/uploads\/2016\/11\/site_optimization2-300x180.png\" alt=\"screenshot of checklist of full site optimization recommendations\" width=\"300\" height=\"180\" srcset=\"https:\/\/alliwalk.com\/blog\/wp-content\/uploads\/2016\/11\/site_optimization2-300x180.png 300w, https:\/\/alliwalk.com\/blog\/wp-content\/uploads\/2016\/11\/site_optimization2-768x461.png 768w, https:\/\/alliwalk.com\/blog\/wp-content\/uploads\/2016\/11\/site_optimization2.png 963w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/a>Annoyances<\/strong><br \/>\nThe sites were a little pedantic about image compression, and they would complain about the need to compress images another 1-4% or so. Since I&#8217;m using a portfolio site, it&#8217;s not really that important to me to try to squeeze every last unnecessary pixel out of my images, especially since most of them aren&#8217;t visible when the page loads. The only one I might consider continue to optimize is the main hero image, because it&#8217;s the first one you see.<\/p>\n<p>The optimization sites also pointed about how long it takes for an embedded Vimeo link to load. This is also not a concern for me, because the video is only visible in a pop-up. And the sites also dinged all my embedded CSS files and image files because they were not coming a CDN. I looked into the option of uploading them into a CDN, but abandoned that idea. (I think it might have required a payment, and per my previous entry, that was not going to work for me.)<\/p>\n<p><strong>Summary<\/strong><br \/>\nFor my next project, I&#8217;ll start with this site first, because it lists out everything\u00a0that&#8217;s slowing down a site, such as a missing .htaccess file &#8212; or I may use it to improve the performance of my other project sites. The nice thing about the results it provides is that it&#8217;s\u00a0very helpful for organizing tasks and working systematically through the performance optimization process.<\/p>\n<hr \/>\n<p>* Yes, <em>prettify<\/em> is word!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Currently finished with the 90% of the HTML\/CSS of my website. I found this great free photograph to use in the main image section of the site. (Looks so classy.) I need to post some of the portfolio image alternatives I came up, but decided not to use. This post is all about site performance &hellip; <a href=\"https:\/\/alliwalk.com\/blog\/2016\/11\/webportfolio-update-part-2-performance\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Web\/Portfolio Update &#8211; Part 2: Performance&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1916,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,330],"tags":[329,353,351,352],"_links":{"self":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts\/1838"}],"collection":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/comments?post=1838"}],"version-history":[{"count":6,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts\/1838\/revisions"}],"predecessor-version":[{"id":1919,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts\/1838\/revisions\/1919"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/media\/1916"}],"wp:attachment":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/media?parent=1838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/categories?post=1838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/tags?post=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}