No Stupid Questions
No such thing. Ask away!
!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules (interactive)
Rule 1- All posts must be legitimate questions. All post titles must include a question.
All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.
Rule 2- Your question subject cannot be illegal or NSFW material.
Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding META posts and joke questions.
Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.
On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.
If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.
Rule 7- You can't intentionally annoy, mock, or harass other members.
If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here.
Credits
Our breathtaking icon was bestowed upon us by @Cevilia!
The greatest banner of all time: by @TheOneWithTheHair!
view the rest of the comments
It's simpler code to re-download the file than retrieve what cached version may or may not exist in memory or on disk. Developers often like to keep code simple at the expense of some kinds of efficiency, like this.
An image is usually small enough to be downloaded in no time on a fast connection, which is what developers usually have and don't stop to think that others might not have.
A video is probably being streamed so earlier segments may no longer be present locally.
This seems incredible
There would already have to be a data layer that serves the main web page renderer. That layer would already have to handle looking in the cache or making an http request in event of a cache miss. It would seem almost trivial for a UI operation like 'save to disk' to simply call that layer to obtain the data if it's available locally else make the http request it was going to make anyway..
For a few hundred K image file I can understand why some might not bother, but I've seen this behaviour where a browser already has an MP4 cached (such that it can replay any part of it without subsequent http traffic) and yet it still makes a new request when saving. It's weird to be honest..
If it were difficult or time consuming to lookup or fetch items from the cache, it's not a very effective cache 😬
It's more about keeping the downloads code independent from the cache code. Once one depends on the other, you can't change either one without considering the other. Minimizing dependencies is a way of reducing complexity.
Easy for the browser to lookup and fetch, not necessarily the process of writing permanently to the disk.
Virtually everything that's ever written permanently to disk first exists in memory though.
If the system isn't built to move it from memory to the disk then it isn't easy to just move it over. The browser might have the file stored in a way that makes it easy to stop and fastforward or even allow it to play or partially load,. Trying to save a file that might be incomplete is far more complicated than a good old reliable direct download.
Think of it like orange juice. The browser may have stored it in a wide shallow bowl because that works better for the browser, but it would be a pain in the ass to pour into a small cup. Much easier to just pour a new cup of orange juice when it is in an expected format.
Maybe I’m not understanding the question but typically a CDN will have HTTP headers to signal to the browser to cache the asset (image). I can’t imagine Pinterest isn’t using a CDN (with said headers), so if it’s re-fetched over the network that sounds like a browser problem more than a developer one.
That's right, I was referring to the browser/client developer. The browser cache is treated as ephemeral storage so it's not a safe assumption that a previously downloaded file is still there.
That’s crazy. I love Safari (I know, it sucks and I’m in the minority) and it usually caches things in memory and doesn’t redownload. Have I been in Appleland too long?
I’m a web developer and deal mostly with complex backend stuff, but is this issue of browsers not caching content common? This is news to me.
Edit: Omg never mind, I did misunderstand the question. It’s when saving it that it redownloads and yeah, I’ve totally noticed it too.