Discussion:
Can Contiki 8-bit Web Browser Open a Local File?
(too old to reply)
TRS-90
2023-12-12 05:05:54 UTC
Permalink
I made a simple home.html file that just contains "hello". I stored it in the same directory as the browser executable. I plugged away with various punctuation into the url-input of Contiki, but no luck. The program always tries "resolving the web host" to no avail.

My thought was to make a local html file as a home page that has the now (unfortunately) huge links required to get things like the weather, even when using FrogFind. Airport codes for weather via FrogFind no longer work, but it is still possible with HUGE url strings including GPS locations.

I guess I could try having a network local web server hosting such a page, but I don't know enough about routing and such to prevent attacks on a local web server. Was kind of hoping it could just be an html file on the Apple II.

Thanks for reading.
Bill Chatfield
2023-12-12 14:27:31 UTC
Permalink
On Tue, 12 Dec 2023 05:05:54 GMT
Post by TRS-90
I made a simple home.html file that just contains "hello". I stored
it in the same directory as the browser executable. I plugged away
with various punctuation into the url-input of Contiki, but no luck.
The program always tries "resolving the web host" to no avail.
My thought was to make a local html file as a home page that has the
now (unfortunately) huge links required to get things like the
weather, even when using FrogFind. Airport codes for weather via
FrogFind no longer work, but it is still possible with HUGE url
strings including GPS locations.
I guess I could try having a network local web server hosting such a
page, but I don't know enough about routing and such to prevent
attacks on a local web server. Was kind of hoping it could just be an
html file on the Apple II.
Thanks for reading.
It is unclear exactly what you're trying to do but it sounds like
you're trying to serve up a web page. Here is a page with an Applesoft
web server. http://www.deater.net/weave/vmwprod/apple2_eth/
Bill Chatfield
2023-12-12 14:36:19 UTC
Permalink
On Tue, 12 Dec 2023 05:05:54 GMT
Post by TRS-90
I made a simple home.html file that just contains "hello". I stored
it in the same directory as the browser executable. I plugged away
with various punctuation into the url-input of Contiki, but no luck.
The program always tries "resolving the web host" to no avail.
My thought was to make a local html file as a home page that has the
now (unfortunately) huge links required to get things like the
weather, even when using FrogFind. Airport codes for weather via
FrogFind no longer work, but it is still possible with HUGE url
strings including GPS locations.
I guess I could try having a network local web server hosting such a
page, but I don't know enough about routing and such to prevent
attacks on a local web server. Was kind of hoping it could just be an
html file on the Apple II.
Thanks for reading.
I understand what you're trying to do now. I don't know if contiki has
code to access local files. It looks like Firefox, Chrome and Edge all
use this syntax to address a local file:
file:///fred.html

I don't know what's up with the 3 slashes.
Oliver Schmidt
2023-12-12 20:24:53 UTC
Permalink
Hi,

The answer to your question in the subject is a simple 'no'.
Post by TRS-90
My thought was to make a local html file as a home page that has the now
(unfortunately) huge links required to get things like the weather, even
when using FrogFind. Airport codes for weather via FrogFind no longer
work, but it is still possible with HUGE url strings including GPS locations.
I totally see your point.
Post by TRS-90
I guess I could try having a network local web server hosting such a
page, but I don't know enough about routing and such to prevent attacks
on a local web server. Was kind of hoping it could just be an html file on the Apple II.
That's much easier than you may think: Usually you'll have a hard time to
make a local web server accessible from the outside. So when you do nothing
to explicitly reach that goal then your web server is typically only
accessible from the inside. And this is exactly what you want.

Just enter the bare IPv4 address of the machine running the web server in
the URL field of the Contiki web browser.

Regards,
Oliver
TRS-90
2023-12-12 23:04:26 UTC
Permalink
Post by Oliver Schmidt
The answer to your question in the subject is a simple 'no'.
Just enter the bare IPv4 address of the machine running the
web server in the URL field of the Contiki web browser.
Thanks Oliver, that's great information. The first line of your response made me laugh because it dispenses with every follow-up question I might have had!

Thanks again,

Matt
Oliver Schmidt
2023-12-14 22:15:31 UTC
Permalink
Hi Matt,
Post by TRS-90
Thanks Oliver, that's great information.
You're welcome!
Post by TRS-90
The first line of your response made me laugh because it dispenses with
every follow-up question I might have had!
:-)

Regards,
Oliver
TRS-90
2023-12-15 01:25:22 UTC
Permalink
That's much easier than you may think: Just enter the bare
IPv4 address of the machine running the web server
in the URL field of the Contiki web browser.
You were right, setting it up was quite easy. It's working. Thanks.

After thrashing around a bit to see what works, I -think- the only viable HTML tags for setting up a home page in Contiki are:

ascii characters only
<html>
<body>
<br> - for vertical spacing
&nbsp; - for horizontal spacing
<a> for href links

And that seems to be the lot.

So a home page might look like:

<html>
<body>
&nbsp; (multiple for centering, etc...)
ascii text wherever
<a href=> whatever locations, multiple
</body>
</html>

So far that works, am I on the right track?

Thanks for reading,

Matt
Oliver Schmidt
2023-12-16 00:29:53 UTC
Permalink
Hi Matt,
Post by TRS-90
[...]
You were right, setting it up was quite easy. It's working. Thanks.
:-)
Post by TRS-90
[...]
So far that works, am I on the right track?
Absolutely!

Regards,
Oliver

Loading...