68 votes
Accepted

When webservers send a page, why don't they send all required CSS, JS, and images without being asked?

The short answer is "Because HTTP wasn't designed for it". Tim Berners-Lee did not design an efficient and extensible network protocol. His one design goal was simplicity. (The professor of my ...
user avatar
42 votes
Accepted

How to improve extremely slow page load time on a 23MB web page full of SVGs?

From what you've stated in the comments (now chat), I understand that you cannot reduce the size of these SVG files, you cannot replace them with thumbnails (e.g. small png files), and you cannot ...
user avatar
24 votes

How can I simulate a slow connection for page load?

In Chrome, you can open the developer tools, click in the device icon (1), and then select the connection throttling (2). Edit (2015-11-03) Since around Chrome 45, it actually got a little bit ...
user avatar
24 votes

How to improve extremely slow page load time on a 23MB web page full of SVGs?

I don't think using separate SVG files for the images would be any better because that would take even more time to load because of separate HTTP requests. Efficient handling of linked images is ...
user avatar
  • 341
15 votes

When webservers send a page, why don't they send all required CSS, JS, and images without being asked?

Your web browser doesn't know about the additional resources until it downloads the web page (HTML) from the server, which contains the links to those resources. You might be wondering, why doesn't ...
user avatar
  • 531
14 votes
Accepted

Improve web site performance via parallel CSS downloads?

CSS files linked from HTML documents are added to the parallel download queue as the HTML is parsed; the key thing is that non-asynchronous JavaScript links block the HTML parser, preventing later ...
user avatar
13 votes
Accepted

What's causing the 'wait' time before my HTML loads?

The technical term for waiting is refereed to as time to first byte and determines the responsiveness of a web server or other network resources. Some common reasons you might see an high time to ...
user avatar
  • 32.6k
12 votes

How to test the speed of a page that is guarded behind login page?

2020 update The Lighthouse tool is now part of Chrome, and you can access it from Developer Tools (F12) -> Audit. You can use it on logged-in pages, and even against Chrome on a real mobile device (...
user avatar
12 votes
Accepted

Blank image. What to use: Base64 vs 1x1 JPEG image

The base64 image option should be used where you would only have a very small number of images and you want to eliminate the network overhead of fetching a picture from the server. However from what ...
user avatar
11 votes

Specifying image dimensions to improve browser performance

Browsers download data in parallel and try to start rendering the page as soon as possible. If you do not specify the size, the browser has no idea how large the image is going to be until after the ...
user avatar
11 votes

When webservers send a page, why don't they send all required CSS, JS, and images without being asked?

Because they do not know what those resources are. The assets a web page requires are coded into the HTML. Only after a parser determines what those assets are can the y be requested by the user-agent....
user avatar
  • 85.8k
10 votes

How to optimize the load time of initial connection and SSL handshake phase of a web page on a 3G network?

Initial Connection You will find that the initial connection includes negotiating the SSL, so since the handshake is high, its a good indicator that something is seriously wrong with the way you have ...
user avatar
  • 32.6k
9 votes
Accepted

Speed comparison - absolute vs relative path links

Effect for browser: Though this looks like a bit of work for web browser, but technically it does not make much of a difference. The browsers are too fast to handle these relative url structure and ...
user avatar
  • 1,694
8 votes

When webservers send a page, why don't they send all required CSS, JS, and images without being asked?

Because, in your example, web server would always send CSS and images regardless if the client already has them, thus greatly wasting bandwidth (and thus making the connection slower, instead of ...
user avatar
8 votes

When should I use the “crossorigin” attribute on a “preconnect” <link>?

All the answers so far seem either simplified, incomplete or partially wrong (topic is complex, things are confusingly named and not well documented!), so here's my understanding: To be able to reuse ...
user avatar
  • 231
8 votes

How to optimize the load time of initial connection and SSL handshake phase of a web page on a 3G network?

Reading the title of your question, there are two things you can do to speed up the initial connection and SSL/TLS handshake. These work for any connection, not just 3G, so you should use these as ...
user avatar
  • 2,241
7 votes

When webservers send a page, why don't they send all required CSS, JS, and images without being asked?

HTTP2 is based on SPDY and does exactly what you suggest: At a high level, HTTP/2: is binary, instead of textual is fully multiplexed, instead of ordered and blocking can therefore use ...
user avatar
  • 71
7 votes

Performance: 4096 Bit RSA-Key compared to 2048 bit RSA-Key

Use OpenSSL's speed command to benchmark the two types and compare results. Here's an example command to run on the server to compare only the key types and sizes you mention: openssl speed rsa2048 ...
user avatar
  • 2,241
7 votes

Tradeoffs around using a query string vs embedding version number in the CSS/JS files

Just to clarify, since it's not explicitly mentioned in the question, that the reason for doing this in the first place is to break the client cache (aka "Cache Busting")... As far as I know ...
user avatar
  • 41.4k
7 votes

When should I use the “crossorigin” attribute on a “preconnect” <link>?

I was searching for the same thing and I found this It states here that if you don't use cross origin attribute the user agent just does the dns lookup but doesn't establish connection with the ...
user avatar
6 votes
Accepted

Can rewriterules work without carets or dollar signs?

You are using the ^ and $ (anchors in regex speak) because you are matching the whole URL, which is what most people want to do, so this is the most common example you see. If you omit the ^ and/or $ ...
user avatar
  • 41.4k
6 votes

What is an acceptable "Time spent downloading a page (in milliseconds)" in Google Search Console?

That report shows how much time Googlebot spends downloading each page on your site, not including linked resources such as JS, CSS, iframes, and images. It is less important to optimize your ...
user avatar
6 votes
Accepted

How do I add the an expires header for external URL components as suggested by GTmetrix and YSlow?

As @Evgeniy has already covered in his answer, in order to add HTTP response headers to resources external to your site, you need to copy these resources locally - to a server that you control - so ...
user avatar
  • 41.4k
6 votes
Accepted

Use A.jpg if you have it in cache, otherwise use B.jpg?

TL;DR answer: I don't think that exists in the way you mentioned similar to webp and, if it's possible, it would be with messy/unsupported workarounds. It may even trigger some ad blockers / antivirus....
user avatar
  • 601
5 votes

Specifying image dimensions to improve browser performance

Responsive Design does not normally use any width or height attributes Google Development Tools is a guide and you shouldn't need to enforce everything you read on their site, in fact some of the ...
user avatar
  • 32.6k
5 votes
Accepted

What if one certain page is much slower than the rest of your website?

Page speed is a ranking factor to some degree, as mentioned by Matt Cutts in this related video (Aug 2013): Is page speed a more important factor for mobile sites?. However, pages are also ranked on ...
user avatar
  • 41.4k
5 votes

Confused about missing width and/or height attributes

Adding the height and width attributes to your IMG SRC HTML tag allows the browser to know how much space to leave for an image. Without these values, the browser gives an image no space until the ...
user avatar
  • 2,476
5 votes

Performance: 4096 Bit RSA-Key compared to 2048 bit RSA-Key

I decided to run openssl speed with three key sizes: 1024, 2048 and 4096 bits. Here are the results on my home PC, which is decent but far from exceptional as far as number-crunching power goes: ...
user avatar
  • 351
5 votes

Blank image. What to use: Base64 vs 1x1 JPEG image

Definitely go with the data URI, unless you need support for IE < 8. (Browser support.) Embedding lots of tiny images directly in the HTML may look like it will take up more bandwidth than linking ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible