gildas-lormeau/SingleFile

Add support for `HTTPS-Only Mode` in Firefox

Closed this issue · 16 comments

Describe the bug
when I save http://dewbell.biz/en/products/water-pipe-love
it does save the text, but not the images or any media on the webpage

To Reproduce
1- Save this webpage. I assume the issue is because it is http not https!? maybe!

Screenshots:
this is the website
image

this is how it is saved
image

Environment

  • OS: [e.g. Win11 Pro]
  • Browser: [irefox]
  • Version: [64]

The page is a bit slow to load and save (it takes approximately 1 min to process the page on my machine). However I cannot reproduce the issue with the default settings. FYI, I attached the saved page in the zip file.

Make sure that the option Network > set maximum download time is disabled or that the value Network > maximum download time (s) is large enough.

Dewbell (6_10_2024 3_42_44 PM).html.zip

@gildas-lormeau

Make sure that the option Network > set maximum download time is disabled or that the value Network > maximum download time (s) is large enough.

It is unchecked (disabled) and it is set to 60

And the file you shared Dewbell (6_10_2024 3_42_44 PM).html.zip is about 9MB while the .html I downloaded using both SingleFile is under 100KB!?

Edit:

  1. I reset SingeFile (reset all options) and saved the page and I got 13kb html file!?
  2. Tried on a different Firefox profile and it saved the page successfully.
  3. I didn't reinstall SingleFile just in case if you want to understand what is causing this issue

Did you change any settings in about:config?

@gildas-lormeau Yes, I did change many settings in About:Config

Edit: Which setting(s) should I disable and then test?

@StoopidoMan probably one of these values network*timeout

@gildas-lormeau I searched for network*timeout in About:Config page and no settings was modified.

Then, I cannot really tell you which setting could be the cause of the issue unfortunately.

I'm closing the issue because it's not a bug in SingleFile. Feel free to comment though if needed.

I FOUND THE CAUSE!! Please read

@gildas-lormeau

to reproduce: on a new Firefox profile, in Firefox settings about:preferences, Check Enable HTTPS-Only Mode in all windows

I tested it several times. Each time when Enable HTTPS-Only Mode in all windows is checked it saves a file under 100 KB, but when Don't enable HTTPS-Only Mode is checked then it save the page properly at around 9-11 MB (not sure why it is not always the same size)

@gildas-lormeau if possible to solve or you plan to solve this in future updates then let us know here, please. I like the HTTPS-Only mode, it makes @StoopidoMan feel safe.

PS: I didn't live up to my name today! And that made me happy.

Thank you @StoopidoMan for the detailed info. I think this could be a useful option. I reopened the issue.

Thank you @StoopidoMan for the detailed info. I think this could be a useful option. I reopened the issue.

@gildas-lormeau I can't imagine how this works, but I assume that SingleFile when Enable HTTPS-Only Mode in all windows is checked it download/save only the HTTPS content of the webpage?

I believe software should just work out of box, so I don't agree that this should be an option in SingleFile settings.

So if firefox allow addons to detect HTTPS-ONLY mode then SingleFile should change the option automatically that would be a better User Experience, it would just work! OR it would warn the user that an option in SingleFile settings must be turned on.

sorry if I misunderstood you,, and wasted your time with this comment. I am stoopid.

I do not envy you, right now, you have a hard job <3 You are a HERO! And I am Stoopid!

It looks like I recently unintentionally fixed the issue without knowing it. I cannot reproduce the bug anymore with the current code of SingleFile. The fix will be available in the next version which should published soon.

Thank you for the kind words :)

The new version is available for download on the Mozilla store.

Tested it, and it worked, THANK YOU! Sir. if you need testers for the SingleFileZ let me know when the update is released.

Feedback (don't read if busy, it might be stoopid):
I love the Info bar, but I miss the old info bar from .maff days. it was a long bar on top of the page with an X to close it. It contained the same info as SingleFile's Info bar. However, it was suitable for me because I would just glance at the info without clicking on the info bar, and I felt it is more archival because in future if someone opened the file they will immediately see the bar on top. The current Info bar is easy to miss, and I am afraid in future when HTML advances it won't be visible or might not be visible properly. a bar on top is more simple, I think, but then I am Stoopid.

Thanks for the feedback!

SingleFileZ is deprecated actually. All its features have been merged into SingleFile. I'll do an announcement soon, probably when I'll officially migrate SingleFile to the Manifest V3.

Regarding the infobar, I understand your frustration. The problem is that it's technically quite hard to implement a top-of-page bar that would display reliably, i.e. that would always work on any page. In the past, this was less of a problem in Firefox because the MAFF extension could use XUL to do this. This is no longer possible these days.

Just feedback, read only if you have time: Not the important

1- by default the infobar icon, would be flashing for 3-5 seconds (switch between yellow and gray) and settles on Gray at the end to attract user attention.

Reason for the suggestion:
When a file is shared, or when the user open the file in far future they will notice the infobar icon. I have a concern that I would forget about it and it is hard to notice. Maybe it is just me.

However, I would advise against this IF you think the code which result in flashing the infobar icon might break in future browsers when the file is opened. The idea of Singlefile is to save an archival version of the file for digital preservation, in my humble STOOPID opinion, thus avoiding things that might cause issues.

unrelated suggestions:
2- The time/date variables are too limited, not fully customizable, if it is customizable then I am too stoopid to figure it out:

  • I prefer how it is on Windows and AutoHotkey. they use a code/variable that looks like this: hh:mmttd/M/yyyy
    With that format the leading zero for month and day is removed and can be added by just adding another m/d. Additionally, the tt adds the PM/AM and I can control which character I can put between each variable like / . \ -_ ; : and to have the hours in 24H format I you can capitalize it HH

Windows/Autohotkey style is easier for not so technical users like me.

3- in the infobar I wanted to add Notes, saved date, and page title, I used the code below:

Page title: {page-title} \n Saved on: Wed Jul 10 2024 01:14:48 GMT+0200 (Central European Summer Time) \n \n Notes:

but it is hard to add notes, so I suggest the window for infobar contect would be multiple lines and accept new line by pressing enter to add notes in several lines.
image

4- Addition of a variable to add a link to SingleFile project in infobar and the version it was saved with.
The Reason for this suggestion: It will help promote SingleFile, and also, have a record of which version of SingleFile was used to save the webpage.

5- Lastly, if Template of the infobar content left empty, it will save in this format
Wed Jul 10 2024 01:14:48 GMT+0200 (Central European Summer Time)
I tried my best, but I couldn't replicate it, I wanted to add,
GMT+0200 (Central European Summer Time)
And
Wed
Jul
but I couldn't find any variable, I would appreciate it if you would tell me how to add the date in this format: 01:14:48AM 10/07/2024 GMT+0200 (Central European Summer Time) and in this format yyyy.mm.dd.hh.mmtt

Thank you for your hard work.