3 ms·
- Host your CSS, JS and images on a CDN -- Serve them from a different domain. Otherwise every element request requires cookies to be sent in the headers. Wast
by agotterer 17y ago
- Host your CSS, JS and images on a CDN
-- Serve them from a different domain. Otherwise every element request requires cookies to be sent in the headers. Waste of overhead for end users.
- Combine as many JS and CSS files as possible. You will also want to compress them.
- Use memcached to cache backend elements to speed up pageloads and hit the database less.
- If you arent using a CDN, at least use a reverse proxy so you don't create unnecessary overhead for your webserver.
- Get a profiler for your app. See what areas are slower then others. Find a database profiler and fix queries that are slow. If your using MySQL use the slow query log to see where there are hold ups.
- Make sure you have the proper indexes on your database. Over doing it can waste memory.
- Try and use gzip if possible. Most browsers support it and it can have a noticeable speed increase.
- ScottWhigham 17y ago* - Host your CSS, JS and images on a CDN -- Serve them from a different domain. Otherwise every element request requires cookies to be sent in the headers. Waste of overhead for end users.* One thing that you have to worry about here is serving these files through https:// https://. A lot of CDNs either (a) don't support https:// https:// or (b) charge a monster fee for it.
- auston 17y agoAnother good one - which may or may not be worth the effort is splitting media across domain names - there is a limit on open connections per hostname for browsers(between 2-8, currently, I believe).