React-snap: Improve preloading strategy

Created on 7 Jan 2018  Â·  6Comments  Â·  Source: stereobooster/react-snap

Improve preconnect, dns-prefetch functionality, maybe use media queries. Example: load in small screen - capture all assets, add with a media query for the small screen, load in big screen add the rest of the assets with a media query for the big screen.

enhancement

Most helpful comment

Isn't it doing it right now? What is your issue?

My content API returns protocol-relative image urls like...
//images.ctfassets.net/foo.jpg
When react-snap runs, i get a preconnect tag for
<link href="http://images.ctfassets.net" rel="preconnect">
Then, since I'm enforcing https:// on my site, I get a mixed content warning for insecure link urls

All 6 comments

Is there anyway to get the preconnect link tag to use https protocol instead of http?

Is there anyway to get the preconnect link tag to use https protocol instead of http?

Isn't it doing it right now? What is your issue?

Isn't it doing it right now? What is your issue?

My content API returns protocol-relative image urls like...
//images.ctfassets.net/foo.jpg
When react-snap runs, i get a preconnect tag for
<link href="http://images.ctfassets.net" rel="preconnect">
Then, since I'm enforcing https:// on my site, I get a mixed content warning for insecure link urls

Also having the issue of mixed content warning for insecure link urls — also pre-loads some things as http (like hotjar and wistia links) but the page loads in https. @mrYakamoto did you find a solution or workaround for this?
Thanks!

I am also getting a mixed content warning on netlify when the site builds. I get image urls like: src="http://localhost:45678/static/media/01-profile.png"

The site is currently entirely front-end, and I've chosen to load everything via JS objects. I've used require("../img/01-profile.png") in the object's image values to make sure it works locally with relative paths.

Has there been any development on this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stereobooster picture stereobooster  Â·  5Comments

philipeatela picture philipeatela  Â·  3Comments

ldevalbray picture ldevalbray  Â·  6Comments

aheissenberger picture aheissenberger  Â·  7Comments

jessevdp picture jessevdp  Â·  8Comments