Open local html website as new tab
-
I made a small website in html, css and js to function as new tab page. I have everything in a folder (and sub folder for css, js and images). I now want to set that page as the default new tab on Vivaldi android.
The problem I face is that I can't load the website. Via the file browser app, I can open the index.html but that only loads the html file without any css or what so ever. I also tried accessing the html file by typing but that also doesn't work
file:///SanDisk%20SD-kaart/files/new%20page/index.html
Accessing it on local storage also does not work.
Does anybody know how to solve this problem (if it is possible anyway).
-
@Vincent500 Embedded the CSS in the HTML maybe.
-
@luetage Thanks for the reply. Embedding the css and javascript works. Only the images don't. They are still seen as external sources and thus not loaded.
-
No problem here with either a css or an image link on a local page here. Note that I'm using relative links (e.g images/picture.png), not absolute ones (file:///etcetera).
However, after making the link absolute it works as well... maybe it's an issue with the medium (looks like you're using an SD-card)? -
@woefdram You can potentially use a data base 64 encoded image directly in the css too. Depends on the image.
-
@woefdram said in Open local html website as new tab:
No problem here with either a css or an image link on a local page here. Note that I'm using relative links (e.g images/picture.png), not absolute ones (file:///etcetera).
However, after making the link absolute it works as well... maybe it's an issue with the medium (looks like you're using an SD-card)?I tested it on both the SD card and internal storage. When opening it on the desktop, everything works so the html file I have is correct.
A question, how do you open the file. Do you go to your file browser app and open the html file or do you navigate to it via the URL bar in the browser. If you open it via the file browser, the URL is
content://media/external/file/a_long_number
I tried navigating to it via the link I posted in the original post but that doesn't work. Maybe that link is incorrect? It cannot find the file if I type the path myself.
-
do you mean you're opening it through menu > File > Open? Effectively that also goes to file:/// here.
From the url you posted last it does look like an issue with external media -
@woefdram no. I tried opening the HTML file via the Files app on my phone. Clicking on the html file there opens Vivaldi using the url "content://media/external/file/a_long_number".
I also tried typing the URL manually like I tried with the URL in the original post. Can you maybe share the file:/// URL you use to access the file? I also have the file on the internal storage.
Btw, the Vivaldi android app has no file > open. That is only available on the desktop version, not the android version.
-
never mind. I forgot to notice the forum category
-
Ppafflick moved this topic from Vivaldi for Android on