-1

For ease of use, I would like to transfer all of my recipe images and html files to a folder on my tablet so that when I open the main html document in the tablet's browser, pictures of the recipes would be present and when I find one I want, I just tap the photo and a new page pops up with the recipe.

I can write html on my laptop, however when it comes to tablets and Android, I'm a bit lost when it comes to the img src ="path" and a href="path" . This is a simple webpage that has a table with pictures of the dishes, and when one picture is tapped the actual recipe comes up in a new page. Could someone please guide me in the right direction?

1 Answer 1

2

I'd say in general you should refrain from using any absolute paths in your HTML file,they will almost definitely break as soon as you change devices, and is probably a bad practice regardless of the purpose.

If you want to do this property I'd strongly recommend creating a master folder for all your recipe related files where you'd keep all the involved assets, like HTML files, photos, and maybe some sort of index.

Then maybe store all images in the same subfolder called Pictures or whatever suits you, and refer to them always using a relative path like src="..\pictures\cake.jpg".

Same goes for the link to the recipes href="recipes\deserts\pudding.html" always keep reative paths instead of absolute ones.

You can then freely transfer or sync your folder structure to your tablet (or any other device for that matter) and have it work seamlessly without additional trouble, as long as you keep the sub directory structure intact.

Doing all this by hand at this day and age seems quite arcane though, if you don't mind me saying. You could consider upgrading to something like TiddlyWiki to automate part or all of the process.

It is a totally self contained, fully offline single file mini wiki/outliner/database that works from a single HTML file containing all the necessary html, JavaScript, CSS, and data.

You can use it partially just to automate building your index and link to your existing html recipes, or fully convert your discrete recipe files into one unified database.

Its real power however lies in its builtin tagging and searching functionality that would make accessing your recipes a whole lot more convenient and faster, so transferring your recipes would be beneficial in the long term. You don't even have to do it all at once, you can gradually transfer files one by one and keep some as linked external HTML files.

It is also highly configurable and hackable, if you say you already write HTML on your laptop you should have little trouble entering the world of TiddlyWiki markup scripting. You can learn more about it at the TiddlyWiki Google Group, I'm sure there are already plenty of user cases for recipe storage there.

You can still keep your data in a fully open, human readable file format, accessible anywhere there is a modern browser.

4
  • I have implemented what you suggested, however, I have broken images on the main page and when an image is selected, there is a message content://com.android.externalstorage.documents/folder/file.html cannot load url error. Is it possible that 'content://com.android.externalstorage.documents' is the file path? I did try that as well, still had the same broken images and url error when the link was activated...does html code even work on android? If it does, what do I need to do to my html files on my pc to make it work on the android platform-G Pad F 8.0 and where do i save them??
    – Shawn Wnek
    Commented Aug 20, 2017 at 17:31
  • Where have you placed said files in the device? How are you opening them? What file browser and webbrowser are you using? Sounds like a permission issue, does your webbrowser have reading access to those files and directories. Do they open fine in your laptop? There is no specific "URL code" for Android Commented Aug 20, 2017 at 20:11
  • the html folder is in the external sd card, opening from the main.html file in the folder, browser?, web browser is Browser V 5.70.14, I dont know about reading access, the directories open fine on my laptop, if the file path is correct, the html file opens and functions fine on the pc
    – Shawn Wnek
    Commented Aug 20, 2017 at 23:23
  • Sounds like webbrowser security features kicking in. Try a decent browser from the PlayStore like Chrome or Firefox, otherwise I'm out of ideas Commented Aug 21, 2017 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .