Question

What are three ways to reduce page load time?

I have asked a question here "What are three ways to reduce page load time?" can anyone help me?

Discussion is locked
Follow
Reply to: What are three ways to reduce page load time?
PLEASE NOTE: Do not post advertisements, offensive materials, profanity, or personal attacks. Please remember to be considerate of other members. If you are new to the CNET Forums, please read our CNET Forums FAQ. All submitted content is subject to our Terms of Use.
Reporting: What are three ways to reduce page load time?
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Comments
- Collapse -
Answer
Good question
- Collapse -
Answer
First we have to define

what you mean by load time, because there is load time and perceived load time. For example, from the user's perspective, a page could be "loaded" and ready to use, while in reality things are still loading in the background.

That said, there are many components contributing to load time:

Network-- Redirect, DNS, and connect time

Backend-- Send and receive time

Frontend-- DOM processing and rendering time

So there are three things that could probably be improved in one way or another, and there are several ways to do it. Before you improve anything though, you need to assess where your delay is as apposed to blindly improving things. There are tools like Google's PageSpeed Service, Pingdom's RUM, New Relic, etc, that can help figure out what's slowing you down.

With all that in mind, some of the easiest things you can do is to utilize a CDN (CloudFlare, CloudFront, etc) if your server isn't close to the majority of your visitors, use some kind of caching system (memcache, APC, varnish, etc) so that pages don't have to be processed on every request, and use speedy server hardware, for example SSD drives instead of SATA.

I could go on and on, but this should give you enough to look into Happy

~Sovereign

- Collapse -
Identifying slow code without a tool

I had slow load times for one of my programs. I decided to see how much time was spent on the server executing the PHP code. I did this by writing the system time to a file at the beginning of the script and then again to a separate file at the end of the script, and I subtracted the start time from the end time. Note, I wrote the time to file because I was using AJAX and a print statement would break the program, so if your not using AJAX then you can use print statements.

My program was taking up to 10 seconds executing the PHP code. I then output the system time in various points in the code, and repeated the process until I was able to narrow it down to one small section of code. I fixed the code and got the load time to less than a second.

Hope this helps

- Collapse -
Answer
Good tips so far.

I'll add one word you can google. I used it a few times with good results.

-> Yslow <-

Bob

- Collapse -
Answer
Follow the tips

1. Optimize Your Images

Know when to use the appropriate file format for your images. Changing to a different file format can dramatically decrease the file size of an image.

2. Don't Scale Down Images

Avoid using a larger image than you need just because you can set the width and height attributes of <img> elements in HTML.

3.Minimize HTTP Requests

When visiting a new web page, most of the page-loading time is spent downloading components of that page (e.g. images, stylesheets, and scripts)

- Collapse -
Answer
To reduce load time

To reduce load time, make fewer http requests, your ajax should be cacheable, clean your code, and remove unused css, etc., or at least minify your css and html;

It is also good to note to remove empty src or href, it is annoying for user and slows your load time (especially if your page is full of them).

Another is to optimize your images and avoid sale images in HTML.

- Collapse -
Answer
Tips

Good tips copied from a post by a member who added a company-url of a web design company, which isn't allowed.

Here are some basic tips for decreasing your web page loading times:
1. Optimize Your Images
2. Don't Scale Down Images - Resize & then use
3. Compress and Optimize Your Content
4. Put Stylesheet References at the Top
5. Put Script References at the Bottom
6. Place JavaScript and CSS in External Files
7. Minimize HTTP Requests
8. Cache Your Web Pages
9. Reduce 301 Redirects

Hope this is helpful.

- Collapse -
Answer
There are lots of ways to reduce page loading time

- Reduce images size
- Optimize JS, CSS file
- Reduce Server Response Time
- Use 64 bit code image for header image
- Use Gzip & Browser Cache
- Use Sprite CSS
- Use CDN Hosting
- Remove unused plugins
- Minify all code

Note: Given the age of this post, your link was removed as dredge spam.

Post was last edited on July 13, 2015 9:59 AM PDT

CNET Forums