Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for older browsers #260

Open
Raptor-TK opened this issue Nov 6, 2024 · 10 comments
Open

Add support for older browsers #260

Raptor-TK opened this issue Nov 6, 2024 · 10 comments
Labels
suggestion An enhancement that may be considered in the future

Comments

@Raptor-TK
Copy link

Raptor-TK commented Nov 6, 2024

I have an old iPhone 6 Plus on iOS 12.5.7 that I cannot upgrade any further however I am using webbased self-hosted services to keep using it via the web browser so I can avoid e-waste.

When I use the built-in iPhone Safari browser or any other browsers like Firefox, Chrome or Opera, when I try to display flatnotes using it will show a blank page.

20241107_031526~2

My understanding is that iPhones use only Apple's webkit engine for all browsers and other browsers are not allowed to use their own web engine.

Would it be possible to improve compatibility for older phones so that we can use this on older devices.

Unfortunately, I can't figure out any way to get any web browser debugging as none of the browsers on IOS support this.

@dullage
Copy link
Owner

dullage commented Nov 12, 2024

Hi @Raptor-TK. Your effort to reduce e-waste is fantastic! I'm sorry to disappoint, but unfortunately I get very little time to work on this project and as such, supporting very old browsers would be too far down the priority list for it to be feasible. Equally, it's not just flatnotes that would need to support these old versions but also all of flatnotes dependencies.

@dullage dullage added the question Further information is requested label Nov 12, 2024
@Code-Otto
Copy link
Contributor

I relate to your e-waste concerns so here's my grain of sand:

I have successfully used Babel (https://babeljs.io/) to post-process the Javascript code of a webapp and its dependencies into legacy browser compatible code
(Used it long ago alongside webdav-js, a WebDAV client written in React. It originally wasn't compatible with the dated WebKit embedded at my TV but after processing the app's compiled Javascript files with Babel it got to work fine)

May be worth looking into for this Flatnotes usecase

@dullage dullage changed the title Safari on old iphones show a blank page trying to load flatnotes Add support for older browsers Nov 15, 2024
@dullage dullage added suggestion An enhancement that may be considered in the future and removed question Further information is requested labels Nov 15, 2024
@Raptor-TK
Copy link
Author

Thanks for the reply Dullage and also Code-Otto for the suggestion.

@dullage If its a matter of running this tool on the code to get it to be compatible with more browsers, and given it works as advertised, would this be something that you would consider using to address compatibility with older browsers so that users don't have to use the tool to postprocess the js code for every release?

I currently run flatnotes using docker so it can make accessing and updating the .js files a bit tricky each time I update to a new version.

@Raptor-TK
Copy link
Author

So I looked at the number of .js files and its quite limited. But there are a lot of .vue files.
Googling vue I see its a dependancy you use to do the user interface.

I also found this: https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode

Apparently vue already does use babel and I think all you need to do is edit packages.json to specify browsers to support as described in: https://github.com/browserslist/browserslist

Checking the iPhone 6, it's using IOS 12.5.7. Not sure what you'd need to specify for it. I did spot an ios_saf 11 there which might work.

@dullage
Copy link
Owner

dullage commented Nov 16, 2024

I can imagine I'd need to build Babel into the Vite build process. As this isn't something I'm familiar with, we'd likely be talking about a number of hours of investigation, implementation and testing. Unfortunately, I'm time short, so have to ruthlessly prioritise.

If someone else did the heavy lifting on this, and the change wasn't too much to get my head around, then I'd be happy to merge.

@Raptor-TK
Copy link
Author

Will investigate further to see if I can get my head around what needs doing to get it to work.

@Raptor-TK
Copy link
Author

Still haven't had time to look into it yet.
Been busy lately.

Will try look into it when I have more time.

@Raptor-TK
Copy link
Author

Okay, i gave it my best effort.
Babel is bundled as part of vuejs.

I updated the packages.json to add a browserslist as per the vuejs docs for Babel.
image

I set it to add support to all browsers since 2015 and rebuilt using "npm run build".
image

The "npx browserslist" command showed it added support for ios safari 12.5.
image

However when I started ./entrypoint.sh and tried accessing from the iPhone 6, it was still a blank page.
image

It works on newer devices so I didn't break anything. Its just Babel didn't help fix the problem.

So my conclusion is that it can't be fixed using Babel.

I did additional googling for github issues for ios 12 and many existed but no one was able to fix it.
:(

@dullage
Copy link
Owner

dullage commented Dec 17, 2024

Good effort trying 👍. Shame it didn't work out.

@Thaurin
Copy link

Thaurin commented Dec 28, 2024

I can also fully relate to this. I thought this would affect me, too, which would have sucked, because I just found this project and it seems like a perfect way to access my collection of unorganized Markdown files.

But I have an iPhone 6S, not an iPhone 6, which can be updated to iOS version 15.8.3. I tested the demo site on my phone and it seems to fully work for me.

Once I install this on my server, I intend to dive into the code a bit, as well. If I can find the time, I may have a look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion An enhancement that may be considered in the future
Projects
None yet
Development

No branches or pull requests

4 participants