Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: iOS / iPadOS local webpage installation and viewing  (Read 3046 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
iOS / iPadOS local webpage installation and viewing
« on: September 18, 2022, 03:21:34 PM »

Ref the old thread at https://forum.kitz.co.uk/index.php/topic,21545.msg423965.html#msg423965

Two years ago, I was wanting to write a web page that would allow me to switch between viewing my various modems’ "easy stats" user-interfaces. Easy stats is the name I cooked up to refer to our member and valued friend johnson’s amazing http service; Mr johnson wrote custom code for ZyXEL modems that enhances them in a variety of ways including allowing the user to see DSL stats information published by http so that the user needs only a web browser. This excellent software is discussed elsewhere and is highly recommended if you have a ZyXEL modem.

I have four modems and wanted the web page to have a list of four links in it pointing to each of the modems in turn. Alex was very helpful in giving me an excellent html file for this purposes - see ref above - which uses an iframe to do the job, something that I had completely forgotten about. It’s 15 years since I had anything to do with web-related design or programming, and I’ve never happened to use iframe, so many thanks to Alex for that - it’s excellent.

I’m left now with a number of other difficulties. It was known at the time that iPadOS/iOS really make life difficult for anyone who simply wants to look at an html file stored in the filesystem. I have no clue why Safari can’t just display local web pages. There would be the problem though of where to park such a file in the filesystem, so that Safari could see it within the app-separation rules that iOS has.

Alex at the time wasn’t able to solve this, and and I have no clue about the details of iOS. One suggestion was to get a minimal app to do the work, somehow to give the file to such an app or even to build it in. I don’t have the experience or the build tools for this, to build such an app myself, and so I’m stuck, unless there is an app available that is ready-built to do this job.

The other remaining problem is something on my original wish-list that hasn’t yet been solved. I want to switch from a current active page’s URL such as eg switch from -
    http://modem1.whatever.uk:8000/subdir/stats.htm  to
    http://modem3.whatever.uk:8000/subdir/stats.htm
where the port 8000 is the interface to the Easy Stats service and we switch from looking at "/subdir/stats.htm" in modem 1 to the same location in modem 3 for example. The ideal would be to parse the current active url, extract the modem number from the domain name, which would be driven by a regex, or a very simple fallback search for a digit 1-9, and then create a new url from a copy of the current active one but with the desired modem number substituted in it in place. Finally we give the new url to the browser and display the current new active page. The regex if needed would come from config somewhere, or could even be squirrelled away somewhere in a well-known location in the iframe document, perhaps using an attribute of some suitable element in the <head/>

I don’t have remotely enough javascript to tackle this latter problem, but if between us we can implement it this would mean it needs to be attached to run a javascript routine when the user clicks on one of four modem buttons and the routine then inspects the current url context and bases its jump to the appropriate modem n target on that.

So those are the two problems : the iOS location + html viewer problem, and the javascript problem.
Logged