The home on the web of Colin Walker.
Find out more on /about, say /EHLO, or tune in to the daily RSS feed.
Dec 1, 2022#p2
One more new thing for /reader.
With Chromium based browsers 1 auto-blocking mixed mode content, links to images addressed as http:// will not load. This leaves certain items incomplete – not ideal.
I'm working around this as follows:
- /reader checks the content of an item for images addressed as http using a
preg_match_allquery - for each 'match' it gets the url and file type
- prepares a random file name with the relevant extension
- grabs the image and saves a temp copy to the server as that name
- replaces the url in the item content
No more mixed mode issues!
To stop things getting cluttered, each time /reader is loaded, it deletes any files in the temp location older than a specified number of seconds.
This may cause a slight delay (especially with large images) but it's better than having no images at all.
-
and let's face it, that's most browsers now 😢 ↩