« first day (2595 days earlier)      last day (2345 days later) » 

1:29 AM
@MichaelEcklund no, but it shouldn't be necessary, it sounds like you're doing blocking/synchronous things, when you should be doing it async
 
What do you mean
Let's just take for example a blog page... Each blog article has a featured image. The page is loading images at various rates and times. Sometimes everything else on the page finishes loading before the first 2-3 blog articles' featured image has even started downloading.
 
that shouldn't be an issue if your HTML is valid
images should have dimensions attached so browsers can layout the page
 
it's not the end of the world, but it just bothers me, that the first few articles (which is what I'm interested in) download last, and not first.
 
otherwise it has to reflow once each image loads and it discovers how big they should be
 
my HTML is valid...
 
1:33 AM
well if those images are big or the browser decides to load them last there's not a lot you can do short of pre-fetching them
 
I am using background images with HTTP2 though, so idk if that matters. http2 downloads multiple files at once, where http1 1 by 1
 
http 1 can do multiple requests, it just means it has to make multiple connections
http2 is more efficient because you can pipeline requests on a single connection, and request multiple things at once without needing the back and forth
it's also encrypted and compressed by default in its entirety
http1 only compresses the payload, and only if supported
 
@TomJNowell Do you think this article is a good or bad idea?
 
depends, if you have a large number of images to display and they take up bandwidth and time to load then yes
but that's a perceived performance problem
 
yes. they're big photos.
 
1:37 AM
like how big?
filesize wise
 
I just want to control the order of which images get rendered
 
that might be counterproductive if half of them are already in cache
and different browsers have different fetching algorithms
 
Are you saying that article i linked you is counter productive?
 
i'm saying you're wanting a yes or no answer, and no such answer exists
it's not as simple as that
lazyloading won't let you control the order images get rendered, only which images are rendered
if there's enough stuff above the fold or whatever you load initially it'll still be an issue
 
what if i only rendered the header of the page initially and then rendered the rest of the page asynchronously?
 
1:40 AM
and there are alternatives, such as setting background colours and gradients as placeholders that match the colours of the images, loading lower res versions, and other design oriented solutions
@MichaelEcklund this could work, but you'll likely torpedo accessibility, and SEO
 
not good for seo?
 
well if the page has only the header..
try out lazy loading
see how well it fairs
 
I thought Google didnt care about JS
 
that's a subject of contention
there are definately crawlers running JS
but are all of them running JS
are they running v8, or a headless chrome?
 
everything should run JS these days lol what
 
1:43 AM
assuming the JS loads
 
why wouldn't it?
 
network issues?
 
on my end or their end?
 
either/both
 
meh. I might try the img deferring thing in that article I linked you
thanks for your input
its all only just a minor nuisance
 
1:45 AM
signal blackspots, cheap wifi routers that get overloaded, spectrum congestion from too many things, deliberate throttling by ISPs, deliberate throttling by users when abroad to save roaming costs, VPNs, Windows networking drivers, proxy machines, unstable SSH tunnels, misconfigured caches, broken CDNs, etc
even cheap USB C -> USB A adaptors can trigger wifi dropouts randomly
also note, the method that article used was used on theverge.com, so half the images would fail to load because ghostery would remove a tracker, then a script would fail that depended on that tracker preventing the lazyloading code from running
 
 
4 hours later…
6:05 AM
Slowly going round the bend hre, does anyone have any experience getting CSS changes to take effect, when the style sheet that is loaded by the browser is different to the actual style sheet at the location, the browser says it is getting the style sheet from?
 
6:21 AM
@gary, sounds liek you have problem with cache busting. Probably your speed optimizations are too agresive
 
Thanks Mark, I'm on a shared host, so i'm guessing I have no control over that? and should move it over to a VPS, and try again?
 
6:55 AM
I assume you have some plugins running or your theme uses coding which is not the best one for cache busting. But it is just a guess.... what file is being used by the browser and what should it use?
does it getting "fixed" when you hard refresh the browser?
 
 
7 hours later…
1:52 PM
Hello everyone :)
can I use is_page() inside a switch
e.g. switch (is_page(value of an array of pages that i'm gonna go thru in a foreach loop))
then case: value1 #codehere
i'm using template redirect hook
 
2:09 PM
have you tried it? Sounds like a good question for the main site
it also sounds lie an XY question
 
it works
 
yay problem solved :)
 
I had a mistake in the usage of is_page
I kept adding / in front
but it actually not necessary
so I removed it and it works like a charm :)
I'm getting the hang of these hooks
 
 
2 hours later…
4:20 PM
Is it possible to use this with more than one pages, e.g. using a switch or if else
I can't seem to get it work
if it redirects it does it for all pages
if it doesn't it doesn't for all
and the condition is based on usermeta
 
4:44 PM
Can I do something like this if ( !( (in_array('PFI', (array($user_access)))) || (in_array('admin', $user->roles)) ) )
! on the the result of the ||
get the inverse of the met condition
 

« first day (2595 days earlier)      last day (2345 days later) »