Tuning for performance.

For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Tuning for performance.

Post by RSteinwand »

Still obsessed with PageSpeed Insights, WebPagetest and GTmetrix scores, I've been tweaking. :?

The addition of a slider to my home page meant I had to load just one slide and build the rest via javascript after page load.
The addition of a YouTube video meant I had to postload it after page load.
I load critical css in the page head and the last couple days I've been trying different css loaders and keep coming back to Google's.
Today I didn't like how Analytics was loading early in the game and postloaded it for a gain of .2 seconds.

Is there a support group for this? :roll:
Rick
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Tuning for performance.

Post by Albert Wiersch »

LOL

Isn't that called OCD? :)

Just make sure the screen (viewport) doesn't jump around as it loads stuff. That is super-annoying and causes me to leave web sites especially on mobile devices. :D
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand »

Nope. No jumping. But I don't use Google Fonts (yet) either.

For mobile I don't load the slider, just the initial slide. If something's missing from the inlined css, it shows as blocking. Spent a lot of time on that. I think any home page that loads under 2 seconds isn't too bad since those are the ones with sliders and large graphics.
Rick
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand »

This article is interesting for those who haven't take the time to create image sprites and haven't (or can't) use http/2: http://www.ravelrumba.com/blog/data-uri ... questions/
Rick
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand »

I have critical css inlined on my public site, which means that the rest of my style sheet is loaded after page load. Inlining critical css means content on the page is visible sooner, often around .5 seconds or so, instead of having to wait for an external style sheet to load.

Although I had several similar scripts I tested, I used Google's recommendation for most pages, including their javascript: https://developers.google.com/speed/doc ... SSDelivery

Once LoadCss was suitable for my site I switched over and knocked about a half second off page load times (compared to the Google script) for most pages. https://github.com/filamentgroup/loadCSS

FWIW, Google links to the LoadCss page from their OptimizeCSSDelivery page.
Rick
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand »

I inlined a sprite image used only on our home page for ySlow score increase of one point and knocked .1 second off page load time.

https://www.site24x7.com/tools/image-to-datauri.html

Of course it was blocked by our Content Security Policy so had to add img-src data:

I'm running out of low-hanging fruit. :?
Rick
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Tuning for performance.

Post by Albert Wiersch »

Don't go too crazy now! :D
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand »

Too late for that. :mrgreen:
Rick
Post Reply