Posts: 1
Joined: Mon Jul 04, 2016 4:40 am

Newbie Q: can I load an .html doc locally onto RPi to play?

Mon Jul 04, 2016 5:19 am

Hi there,

I am a complete newbie to the RPi world and would like to know what I might need to purchase (including best RPi type and software for this use) to load and play a .html file that includes lots of movement (eg html5 game or lots of gifs). Rather than using the RPi to access an online page, I was hoping I could just put a .html project (plus its .js and .css files, etc etc) locally onto an RPi operating system and just run it from the desktop so that no internet access is required. I'd hope to do this through a touchscreen like this, if these are good options:




Is this possible, and if so what would be the interim steps in getting .html files to run smoothly? For example, what browser should I try? And would I have to retro-fit my html file to play in that browser? I have the html projects already created, so this would be about retro-fitting them for the RPi system. I found this discussion about browsers but not sure if things have changed/updated/got better since then viewtopic.php?f=36&t=107966&start=25

This is about the only tutorial I've found so far that mentions fitting a html file for use on RPi: http://raspberrywebserver.com/html-and- ... qus_thread but it doesn't really account for loading locally rather than from a server/the net.

My html pages tend to include a lot of movement, so the issue of lag is something I'm also interested in... I've heard that the RPi struggles with frame-rate on moving elements in html5? Is this still the case?

Thanks for any help you can give me or any tutorials you can point me to. Sorry for being so vague! Maybe I should just use Scratch to create games instead...

Posts: 122
Joined: Tue Jan 26, 2016 1:42 pm

Re: Newbie Q: can I load an .html doc locally onto RPi to pl

Tue Jul 05, 2016 5:39 am

You can, but performance will be questionable. As seen here:
https://www.reddit.com/r/raspberry_pi/c ... erry_pi_3/

Posts: 26
Joined: Sat May 07, 2016 1:30 am

Re: Newbie Q: can I load an .html doc locally onto RPi to pl

Tue Jul 05, 2016 10:58 am

Hi Lokitoes,

Your query is a bit too general for any of us to give you any real feedback, but to address your request -

You can run a .html file locally on a Raspbarry Pi, you'll need Apache or something similar to setup a web server on the device and a browser such as Chromium to view the page itself.

As Goraxium already indicated, the relative performance or playability of the game is going to depend heavily on the amount of local rendering that's required by your page / game, bear in mind you're only playing with 1GB ram which isn't a great deal if you're using high res images.

Scratch is definitely an option, I haven't used it for quite some time although the experience I had with it a couple of years ago was that it tends to be a bit of a memory hog so again, lots of images will probably result in a slideshow, I haven't got much experience using Scratch on a Pi, only on a normal desktop.

If you're already using Javascript in your web page games then it sounds like you're familiar with programming at least on some level, so maybe it's worth taking a look at Python and Kivy - Python is one of the 'native' languages of the Raspberry Pi and Kivy is a free add-on library which introduces touch input for Python programs.

If you want more specific information, point me to an example of one of your games and I'll try to be a bit more specific.

Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: Newbie Q: can I load an .html doc locally onto RPi to pl

Tue Jul 05, 2016 11:13 am

If is just a HTML5, without server side interaction (CGI, AJAX, or similar), just open the html file.
Go to file menu, open file, and select the html file. ctrl+o can open file selection dialog.
Or, use file:///patch/to/file/file.html on location bar.
Obviously, links on .html need to be relative, no http://bla/bla.gif, just bla/bla.gif.

Posts: 1
Joined: Wed Apr 04, 2018 7:11 pm

Re: Newbie Q: can I load an .html doc locally onto RPi in ftp server

Wed Apr 04, 2018 7:17 pm

Please, send me document or link how i can load html doc to ftp server.

Return to “Beginners”