Post by Joe1234 » Sat Mar 09, 2024 1:30 am

I contacted a developer who has blocking assets somehow loading before my image with a preload tag. I have my image ahead of the javascript and with preload properly set and yet still his javascript loads before the image. I see it in the rendered html and the network developer console. His response was:
Assets added before your preload image are later dynamically added when slider module renders, it will not affect your preload setting since it is already parsed by browser and preloaded.
This doesn't sound correct to me. If I can literally see the load/blocking time of the assets before my image loads, then it is affecting the image load time. Am I incorrect in my thinking? Because to me, based on what he said, the network part of the developer console would be giving me incorrect information.
Last edited by Joe1234 on Wed Mar 13, 2024 12:17 pm, edited 1 time in total.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by straightlight » Sat Mar 09, 2024 7:45 am

URL.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Joe1234 » Mon Mar 11, 2024 8:43 am

Sorry, I don't post my site here. But if it's something specific you need to know just let me know and I'll post the info or an screenshot.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by ravikumar22 » Mon Mar 11, 2024 5:15 pm

Joe1234 wrote:
Sat Mar 09, 2024 1:30 am
I contacted a developer who has blocking assets somehow loading before my image with a preload tag. I have my image ahead of the javascript and with preload properly set and yet still his javascript loads before the image. I see it in the rendered html and the network developer console. His response was:
Assets added before your preload image are later dynamically added when slider module renders, it will not affect your preload setting since it is already parsed by browser and preloaded.
This doesn't sound correct to me. If I can literally see the load/blocking time of the assets before my image loads, then it is affecting the image load time. Am I incorrect in my thinking? Because to me, based on what he said, the network part of the developer console would be giving me incorrect information.
hi
network part of the developer console would be giving me incorrect information.= Network part developer console is giving correct information.

Image
:) :D :( :o OpenCart Support | Please email at: devinlabsolutions@gmail.com , info@devinlabs.com :drunk: :laugh: :)


User avatar
New member

Posts

Joined
Sun Apr 12, 2015 6:33 am

Post by ADD Creative » Tue Mar 12, 2024 12:50 am

Have a look at the examples at https://web.dev/articles/preload-responsive-images.

Your preload image could be loading first but finishing after the script.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Joe1234 » Wed Mar 13, 2024 12:16 am

When you say loading are you including the queing in that? Then yes I guess it is being preloaded, but if not, then the preloading is not taking place. As you can see in the image, the actual loading process of the image is taking place well after other things have started.

The very first piece of code after the head:

Code: Select all

<link rel="preload" as="image" href="https://....webstite..../baby-girl-in-tent-1200x455.jpg.webp" imagesrcset="https://....webstite..../baby-girl-in-tent-1200x455.jpg.webp 1x, https://....webstite..../baby-girl-in-tent-2400x910.jpg.webp 2x" />

Attachments

Screenshot 2024-03-12 120959.jpg

Screenshot 2024-03-12 120959.jpg (88.2 KiB) Viewed 550 times


v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by ADD Creative » Wed Mar 13, 2024 5:04 am

It looks from that screenshot that it is being added to the preload queue, but you have a lot of blocking stylesheets and something else delaying it.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Joe1234 » Wed Mar 13, 2024 12:17 pm

I'm seeing what's happening now. Regardless of where I put it, the browser is determining what order to load things based on the "as" value. So image files will always come after styles and scripts when they all have preload on them (I didn't know the other things had preload with the way this was coded, only just saw it when going over the console). There should be an index/importance value that supersedes what the browser does so certain things aren't subject to blocking. The interesting thing is even though I have the image in the head with the preload tag on it, a vitals test tells me I can increase speed by setting the preload on said image since it's a LCP image....like the tag isn't even there, go figure. Anyway, thanks.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am
Who is online

Users browsing this forum: No registered users and 18 guests