How does reddit update it's favicon on the fly without running into caching problems? [duplicate] - favicon

This question already has answers here:
Changing website favicon dynamically
(18 answers)
How do I force a favicon refresh?
(33 answers)
Closed 7 years ago.
Whenever I change a favicon on a site I work on, it can take hours/days for the browser to re-request the new resource.
But when I go to reddit, if I have a message I get a notification in the favicon, without a page load as well, I think?
Is this as simple as supplying a new favicon with a different filename? How do you get the browser to load that without doing a page load?

Related

How to make a form able to upload files in elm [duplicate]

This question already has answers here:
File Upload in Elm
(4 answers)
Closed 6 years ago.
I am trying to make a form in elm that would be able to upload a picture and some accompanying data.
Right now all my fields are updating my model via the onInput function, and I when I press the submit button I send my data as JSON via the Http.post function. If I understand well this is the idiomatic way of doing forms in elm.
Is there a way to add file uploading capabilities to this kind of form? If possible I would like to keep control in the elm app without resorting to the standard html elements to do submitting.
Here you are. Some of my notes:
http://simonh1000.github.io/2016/12/elm-s3-uploads/
https://github.com/simonh1000/file-reader
https://github.com/danyx23/elm-dropzone
https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop
File Upload in Elm
elm: read file content
https://www.paramander.com/blog/using-ports-to-deal-with-files-in-elm-0-17
Add support for https://github.com/elm-lang/html/issues/20
https://github.com/lovasoa/elm-fileinput
https://www.reddit.com/r/elm/comments/4926am/uploading_files_through_elmhttp/
http://elm-ui.info/documentation/guides/handling-files
How to trigger click event in elm
Yes, native code is needed for two things:
to access the FileReader API; and
to 'trick' the HTTP library into allowing you to add a file to a multipart form.
This is all covered in this blog post, which accompanies the FileReader library mentioned by rofol.
Instead of native code, you can of course use ports.

I accidentally deleted a picture in my album on FB and it was uploaded years ago and I dont have a copy how can i get it back [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I am not tech savvy but I was taking a picture that I have had on my FB act album since 2007 and trying to copy it. It was of the first moments after my daughter was born and they laid her in my arms after a Cesarian section. It is the only place I had the picture. No other copys. The actual camera was lost. I was trying to do a "then and now picture" her birth to her first day of kindergarten and now I have lost it by accidentally hitting delete instead of copying.
Is there ANYWAY to get it back? Does FB have a trash folder?
Beth
So, I know this question is probably off-topic but I can't help but feel bad for lost baby photos.
First of all, if anyone else tagged the photo, it would be linked to their account as well. If you've ever emailed anyone the photo, likely you would have either sent the photo itself or a direct link to the facebook website where it's stored. It's probably still stored there, but now you just have (unfortunately) no way to access it. So if you ever sent the link to anyone, if you find the link, it will still link to the page.
If you're someone who doesn't routinely purge your browsing history, there may be a chance that a copy of the photo was saved to your browser's temporary files folder while you were looking at the photo. If you use Internet Explorer 7 or 8, here's a guide. Otherwise just Google "<your browser name and version> temp folder location".
http://windows.microsoft.com/en-us/windows-vista/view-temporary-internet-files
Of course, neither of these may work. If so, sorry for your loss of data. Good luck!

How do I create a favicon.ico file for every directory I want? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Favicon in subdirectory all subdomain
My website is one big website, with many little projects in it. Each of the projects also have their own favicon.ico file (the one which is shown on the left hand side of the url bar), but even if I put a favicon.ico file inside a subdirectory, it will still not show up, and will use the favicon.ico file put at the root directory.
How do I solve this problem?
Lucas
You can set it on a per-page basis, like this:
<link rel="shortcut icon" href="http://example.com/myicon.ico" />
inside the <head>..</head> tags.
Setting it on a per directory basis does not work.

mechanize print to pdf [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
How do I grab a thumbnail screenshot of many websites?
I wrote a script using perl mechanize to login and fetch a page. How can I "print" that page to "pdf" directly from my perl script? I'd like to save a snapshot of how it looks in the browser.
I can get the html using $mech->content();
Check out wkhtmltopdf - there are variants for PDF and images (PNG etc). It's basically a command-line tool wrapping the webkit html engine. Works quite nicely, and it's cross-platform too. Whether you can get it past your login form will depend on how the target site works.
There's a number of CPAN modules to convert HTML to PDF. Feed any of them the content from Mechanize.
The $mech contain plain html so you can't just print it. Check this thread: How do I grab a thumbnail screenshot of many websites?

How can I extract images from a PDF file? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How can I extract images from a PDF file?
I am able to extract the images from a PDF file using many Perl modules, but none of them specifies the exact positions of the images being extracted (where the image actually belongs).
Could anyone suggest to me how to extract the images along with their positions?
Thanks in advance.
An indirect solution is to use pdfimages to scan the pdf file page by page. If there is an image, at least you will know which page it is in.
For example, you can use pdfinfo to find out the number of pages there are in a given pdf file, and use pdfimages with the -f and -l options to scan a particular page.