What is your process for optimizing page load times?

drinks2go

New member
Because one of my favourite things to do is to optimize pages for speed on the client side (which is often about as far as you can go with a shared hosting account), I thought I would start a thread where we could share tips and tricks or methods to get a faster loadtime for our visitors.

It is very important, especially if you've monetized your website, to get the website loaded and interactive in less than 1000ms from the time to first byte (this is the first byte of data the client receives back when requesting your website, usually it's the DNS lookup). There are plenty of marketing websites online that talk about how increases in speed can lead directly to increases in conversion rate (if you weren't ware, conversion refers to "converting" a "lead" - this is a potential customer - into a "customer" - this is, obviously, an actual paying customer).

One term I will be using a lot here is "client" or "client side"... in this context I am referring to the end user, and often times just the browser, not the user themselves. You can contrast this with "server side" which would refer to the goings-on with your webserver- the time Apache takes to compile your php scripts, for instance, is a "server side" metric whereas the time it takes a browser to compile and draw your HTML/CSS/JavaScript is a "client side" metric.

So! With this out of the way... you want to know... what can I do NOW to make my website FASTER?

Frequently this is only possible on a VPS or dedicated server, though on some shared hosting accounts with friendly support staff, you may be able to have them turn it off for your account. Why? Read the freakin' manual:
Basically, if you enable .htaccess, Apache will search for a root .htaccess (usually in /home/public_html/ or /home/www/), then, say the client requests /images/blah.jpg, not only will apache look for the root .htaccess, it will also search for .htaccess in descendent folder the client accesses. So, if the client requests instead /assets/images/blah.jpg, that's apache looking up 3 .hatccess files, not just one. Be careful though, many software are written with the expectation that you are using .htaccess, and will break if you don't add the appropriate rules to your server config.
___________________________

Step 1: Ensure your HTML/CSS is valid.Step 2: Minimizing http requests.How to defer loading JavaScript until page loads with Varvy.com & The FilamentGroup's loadCSS javascript function
 

AleksssBoss157

New member
Thanks.I didn't disabled .htaccess because I didn't know it slows down the websites but thanks.Oh and I recomend for more optimizing use cloudflare and allways on for even more speed(if you have your domain bought because I don't think you can do this with subdomains from free hosting).
 

amontes

New member
If your webpage fetches a database, such as mysql or even sqlite, I would suggest double checking the queries. YOu may find that you can build one larger query instead fo multiple subsequent queries. That reduces the number of fetches against the website hard drive or storage. Take into account that the shift registers are the quickest, if you need something else you may use your CPU's cache memory. If not, you may go to RAM which is about 1000 times slower, if not, you may got tho fetch from Random Access Memory RAM wich is 1000 times slower, if not you may fetch data from a non volatile medium such as a hard drive wich is 1000 times slower.

To sum up, try using smarter fetches that avoid reading from non volatile storage.