Yireo_LinkPreload icon indicating copy to clipboard operation
Yireo_LinkPreload copied to clipboard

What would be a good way to exclude styles-l from the preloads?

Open jellesiderius opened this issue 3 years ago • 2 comments

Hi Jisse,

Thanks for creating and maintaining this great Magento module! We're facing one small issue for mobile users where the styles-l gets preloaded while this is not really necessary to download on a mobile device. Do you think it would be a good idea to exclude the styles-l from preloading on mobile? Maybe it would be nice if we can make this configurable and be able to whitelist a couple of files through the settings?

jellesiderius avatar Jan 31 '22 16:01 jellesiderius

I didn't actually think of this. I don't see myself as an ideal expert on performance. So I don't know whether it is better to preload the styles-l stylesheet for all devices while not needed on mobile, or to not preload the styles-l stylesheet at all. But it might also depend on the sizes of the files. Perhaps it is best to allow for this to be configured. Unfortunately, there is no conditional preloading possible (aka: preload something depending on media queries or something).

jissereitsma avatar Feb 09 '22 16:02 jissereitsma

Is there any update on this 'issue'?

We use a custom theme (child-theme) for mobile, where we want to exclude the styles-l being preload. Is there a setting in the module, to exclude a specific file to be preloaded?

In that case we can only load this in our mobile theme.

JelleGe avatar Jun 01 '23 12:06 JelleGe