- the self-closing tag assumes XHTML and should adjust to the DOCTYPE (same problem in combine_css);
What is the 'self-closing tag'?
Having an extra "/" at the end of the tag. It's not valid in HTML4, but is required in XHTML and optional in HTML5.
e.g.
<meta HTTP-EQUIV="refresh" content="0;url='http://<domain name>/?ModPagespeed=noscript'" />
<link rel="stylesheet" type="text/css" href="http://<combined_css>.css"/>
If the DOCTYPE specifies HTML4 or lower the "/" should be omitted. Otherwise the page will throw validation errors making it harder to debug.
- the <style> selector should be changed to something like: body * { display: none; }
Why so?
What you have now only hides the contents of certain tags: table, div, span, font, p { display: none; }
Any content not a child one of those will still be visible. "body * { display: none; }" should hide all content, plus it's shorter.
- the <div> should define a background and text colour to ensure it stays visible;
Good point.
- and maybe use better wording than "Please click here ..."?
What do you suggest and why is 'Please click here' poor?
For accessibility, "here" is a very small target, and for usability you should include a verb. e.g. "Click this link if …".
- Issues with inline_preview_images:
- In our testing on SIMNET, the large photo on the homepage (710 x 400) was replaced by a 15,000 character data URI which did load faster than the original and wasn't too chunky;
- However, the overall page load time was longer due to the extra HTML. The page size went from 3.3kb to 4.9kb (prioritize_critical_css) to >17kb (inline_preview_images) causing load times to increase from 1.3s to 1.5s. It will also increase bandwidth usage;
Does the original time (1.3s) and bandwidth (whatever) include the time and bandwidth of download the image as separate URL? In many case, though yes not all, we've seen that inlining the image results in faster download/rendering because it eliminates the cost of another HTTP connection.
?! with this filter the original image (60-70kb) is still downloaded as well as inlined (15kb). The inlined version is just used to fill the space until the full resolution version is downloaded. The visual effect is definitely better, making the website appear faster, but in reality it takes longer for all elements to be loaded, and uses more bandwidth.
- I'm assuming there is (or will be) a way to target only images of a specific size, or only specific photos? By default the website logos are also being converted to inline previews which could upset some business clients.
IIRC you can already limit the size of inlined images, though to be honest I don't know if that's overridden/ignored by the new filters.
I believe we are planning on an attribute to disable inlining of a specific img.
Re the website logos, are these on other sites (like, say
www.facebook.com)? If so, AFAIK they should only be inlined if you have authorized that domain, but again I could be wrong or there could be a bug there. Why do you think these other website owners might get upset - do they use these are beacons?
Only the websites own logos and branding. Setting the lowres inlining cutoff to 5kb solved it in this case.
We have/had clients who would flip out at seeing their logo appear at a low resolution, even for just a flash. (-;
Finally, thanks for the fabulous data and feedback, we really appreciate it!
No problem. I hope to test more sites next week on our main server. Maybe when the new beta arrives?