Minimalist webkit based browser

Discussion in 'PowerPC Macs' started by wicknix, Aug 9, 2017.

  1. wicknix, Aug 9, 2017
    Last edited: Aug 15, 2017

    wicknix macrumors member

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #1
    I'm working on a simple light weight browser similar to dillo/midori for Tiger and Leopard. It's really just a front end for webkit. Meaning it will use the built in webkit safari uses. Leopard users can relink it against LWK (recommended). It's not pretty to look at, but it's small in size and quick on most sites i've tested.

    What it doesn't do or have:
    No UI icons for forward/back/stop (yet)
    No plugins
    No ability to save files
    No on the fly user agent switching

    What it does do currently:
    Browses the web ;)
    Identifies as an iPhone 3 (works better on slower machines than iPhone 7 user agent did)
    Has a generic bookmark utility. When closing a window it'll ask to save. (work in progress)

    I'm mostly doing this for fun, and to learn more about xcode/cocoa. I hope to implement everything i listed above eventually (except plugins).

    I've uploaded v1.4 if anyone wants to play around with it for kicks. Just unzip and double click to start it.

    Cheers
     

    Attached Files:

  2. backyardvoodoo macrumors newbie

    Joined:
    Sep 24, 2016
    #2
    Great beginning! Are you going to open source it? What are some of the features you have in mind for it?
     
  3. AphoticD, Aug 9, 2017
    Last edited: Aug 9, 2017

    AphoticD macrumors 6502a

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Queensland, Australia
    #3
    Great idea! Maybe add an option to disable javascript and/or stylesheets for sheer speed?

    It's probably outside of the scope of an app, but it would be useful on older hardware to find a way to deliver https pages over http for the sake of speed and simplicity (at the cost of security).

    More often than not, the older browsers fall over on websites because of the current implementation of HTTPS and not all websites continue to deliver their standard (non-sensitive) pages over HTTP.
    --- Post Merged, Aug 9, 2017 ---
    It works well in Tiger.
    Panther caused the app to bomb out before it launched.

    Also, the icon you've got in the bundle is cool.
    Safari.jpg
     
  4. backyardvoodoo macrumors newbie

    Joined:
    Sep 24, 2016
    #4
    Please no! The reason why older browsers fail is because of out of date SSL certs or unsupported encryption algorithms. Either way you are putting yourself at risk. The speed implication is really negligible, browsers have been doing SSL since 1994. Sites on the other hand have become super bloated and are the reason why browsing is slow. As long as you link against a fresh copy of LWK you're safe.
     
  5. backyardvoodoo macrumors newbie

    Joined:
    Sep 24, 2016
    #5
    What would be an awesome feature addition though is a trigger for a mobile browser agent!
     
  6. KawaiiAurora macrumors 6502

    KawaiiAurora

    Joined:
    Dec 16, 2016
    Location:
    Europa
    #6
    If you implement a user agent changer and a refresh/reload button, I'm sold!

    I'm a big fan of lightweight browsers such as Midori
     
  7. AmazingHenry macrumors 65816

    AmazingHenry

    Joined:
    Jul 6, 2015
    Location:
    Central Michigan
    #7
    The biggest wall I faced when trying to make my own browser was removing the requirement to type "http://www.". I didn't know very much code when I tried that though. Have you figured out how to fix this?
     
  8. Dronecatcher macrumors 68000

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #8
    Great start - hope you plug ahead with it :)
    Where is it reading the user agent from - is there a plist file?
     
  9. wicknix, Aug 10, 2017
    Last edited: Aug 13, 2017

    wicknix thread starter macrumors member

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #9
    I've redesigned the UI a bit. It's slimmer for more viewing area and included the ability to "refresh". Also cleaned up some code resulting in a much smaller file size.

    To answer a few questions...
    *The user agent is currently pulling from whatever webkit defaults to when no custom user agent is added. I'm looking in to that soon. Looks to be in webview.h from what i've found.
    *Henry, no i haven't figured that out. You dont need to add "www" but you do need to add "http://".
    *Features will be limited (i'm not that gifted..lol) and i want to keep it simple.

    *EDIT* I updated first post with current download (v1.2)

    Cheers
     
  10. mzs.112000 macrumors regular

    Joined:
    Apr 22, 2015
    #10
    Even if features are limited, it is still great to see new programs are being built for the PowerPC platform.
    My philosophy is that a platform is NOT obsolete unless, 1.) It no longer is able to serve its intended purpose, AND/OR software is no longer being created for it.
    By my logic, MacOS 9 is not obsolete yet, as Classilla is still under development for it and does get updates once-in-while
     
  11. SuperKerem macrumors 6502a

    SuperKerem

    Joined:
    Oct 29, 2012
    Location:
    London, England
    #11
    What are you using to write a new PPC app? An old version of Xcode?
     
  12. AphoticD macrumors 6502a

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Queensland, Australia
    #12
    If you're using a controller class for the WebView browser, you could add something simple like;

    Code:
    - (IBAction) enterAddress:(id) sender
    {
        NSString *addressURL = [sender stringValue];
     
        if([addressURL hasPrefix:@"http://"] == NO &&
           [addressURL hasPrefix:@"https://"] == NO &&
           [addressURL hasPrefix:@"file://"] == NO)
            addressURL = [@"http://" stringByAppendingString:addressURL];
     
        [myWebView setMainFrameURL:addressURL];
    }
    
    and connect your address field to this enterAddress: action in IB.

    You could alternatively write a regular expression to allow more (any) protocol types and check for an existing protocol before prefixing to prevent piling up of protocols like 'http://about://'. But this method works fine with a simple 'google.com' or 'macrumors.com' address when tested in Leopard.
     
  13. KawaiiAurora macrumors 6502

    KawaiiAurora

    Joined:
    Dec 16, 2016
    Location:
    Europa
    #13
    Last update was in late 2014 so it's safe to say that OS9 is obsolete. It still serves its purpose depending on what you do
     
  14. Dronecatcher macrumors 68000

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #14
    Not strictly obsolete, just the author doesn't have the time to do that along with TenFourFox at the moment. Full time job plus the new Power9 system he'll be developing for, we're lucky even TFF is still happening!
     
  15. KawaiiAurora macrumors 6502

    KawaiiAurora

    Joined:
    Dec 16, 2016
    Location:
    Europa
    #15

    Yeah, that's true. TFF is more important IMO
     
  16. mzs.112000 macrumors regular

    Joined:
    Apr 22, 2015
    #16
    And remember, one of my criteria, was that it also no longer is able to perform the tasks that it was built to do.
    So technically, even if you just boot it up and start up the calculator program every 2 months, if that is what you require it to to, and it is still able to do that, it is not obsolete.
     
  17. AphoticD, Aug 11, 2017
    Last edited: Aug 11, 2017

    AphoticD macrumors 6502a

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Queensland, Australia
    #17
    Not quite within the definition here, but although Backdrop is an OS9 app built in 2001, I "released" it only last month.

    So, there is a feather in OS9's cap.

    The app is also 68k and System 7.5 compatible. So are those systems obsolete? They CAN still serve a purpose AND communicate with modern systems.

    For example, A Quadra 840 is a beast of a DTP system, which could easily run Photoshop 3, layout a newsletter in Quark Xpress 3, Print2PDF and then send out said PDF formatted newsletter to an active email mailing list using Eudora or Outlook Express.

    It's a matter of defining a purpose for legacy hardware and software and if it fits a need and works in the way you want, there's no need to mark it as obsolete.
     
  18. wicknix thread starter macrumors member

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #18
    SuperKerem, yeah xcode 3.1.4. AFAIK that's the last version to support Leopard.


    AphoticD, Thanks for the code snippet.

    Cheers.
     
  19. ifrit05 macrumors regular

    ifrit05

    Joined:
    Dec 23, 2013
    Location:
    Near Detroit, MI. USA
    #19
    You could probably get away with using open-source toolbar icons like "Open Iconic" (https://useiconic.com/open), as long as you give credit.

    Would re-linking this with Leopard WebKit serve no purpose? It would just act like LWK with a different UI, right?

    Anyways, keep it up. PPC, what is dead may never die. (shameless GoT quote ripoff...).
     
  20. AmazingHenry macrumors 65816

    AmazingHenry

    Joined:
    Jul 6, 2015
    Location:
    Central Michigan
    #20
    I think the relinking should work, and, yeah, you'd have LWK with a different UI. It would probably be faster too.
     
  21. wicknix thread starter macrumors member

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #21
    I've updated first post with a new build. Now identifies as an iPhone 7 with mobile safari 10.1.2. Reload/refresh added. :D

    Cheers
     
  22. ifrit05 macrumors regular

    ifrit05

    Joined:
    Dec 23, 2013
    Location:
    Near Detroit, MI. USA
    #22
    I think it would look better if you implemented the buttons and URL bar in an instance of an NSToolbar (the items become instances of NSToolbarItem, my terminology might be a little off though.)
     
  23. KawaiiAurora macrumors 6502

    KawaiiAurora

    Joined:
    Dec 16, 2016
    Location:
    Europa
    #23
    I'd like an option to identify as Safari 5 to get a slightly more lightweight version of desktop sites since my PowerBook G4 can handle most desktop sites just fine.
     
  24. wicknix thread starter macrumors member

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #24
    ifrit05, i'll look in to that. I'm still learning. Lots of documentation to dig through.

    KawaiiAurora, Just for you i've attached a new build with safari 5 user agent to tide you over until i figure out how to add a menu item or preference pane to change user agents. Currently i can only do it manually and then recompile the browser.

    On a side note i've updated my first post again. New build (1.4) now has app icon, and changed user agent to iPhone 3 as it works better on sites like facebook and twitter than the iPhone 7 user agent did.

    Cheers
     

    Attached Files:

  25. vddrnnr macrumors newbie

    Joined:
    Jan 23, 2017
    #25
    Hi wicknix,

    Is there any chance you'll be implementing "tabs"?

    Best regards,
    voidRunner
     

Share This Page