Showing posts from June, 2018

Tips for Website Performance Optimization

1. Reduce HTTP Requests# When your browser fetches data from a server it does so using HTTP (Hypertext Transfer Protocol). It is a request/response between a client and a host. In general the more HTTP requests your web page makes the slower it will load. There are many ways you can reduce the number of requests such as: Inline your Javascript (only if it is very small)Using CSS SpritesReducing assets such as 3rd party plugins that make a large number of external requestsDon’t use 3rd party frameworks unless they are absolutely neededUse less code!Combining your CSS and JS files (with HTTP/2 concatenation is no longer as important) 2. Minify CSS and Javascript
3. Reduce Latency with a Content Delivery Network (CDN)
4. Caching - Browser Cache - Server Cache
- Caching HTTP reverse proxy
5. Enable Gzip Compression
6. Serve Scaled Images
You should always upload your images at scale and not rely on CSS to size them down. If you do you will run into this little Google Pagespeed recommendation…

MySQL indexes

You should definitely spend some time reading up on indexing, there's a lot written about it, and it's important to understand what's going on. Broadly speaking, and index imposes an ordering on the rows of a table. For simplicity's sake, imagine a table is just a big CSV file. Whenever a row is inserted, it's inserted at the end. So the "natural" ordering of the table is just the order in which rows were inserted. Imagine you've got that CSV file loaded up in a very rudimentary spreadsheet application. All this spreadsheet does is display the data, and numbers the rows in sequential order. Now imagine that you need to find all the rows that has some value "M" in the third column. Given what you have available, you have only one option. You scan the table checking the value of the third column for each row. If you've got a lot of rows, this method (a "table scan") can take a long time! Now imagine that in addition to this tabl…