5

On my computer I'm developing some simple front-end web pages made of typical structure:

  1. HTML source code for structuring the elements;
  2. CSS classes linked to the HTML;
  3. JavaScript files linked to the HTML as well.

I put everything on a Dropbox folder and I'm so able to view all these files from my Dropbox application on the iPhone.

If I open the HTML files from there, I'm only able to see its basic HTML structure: no CSS is called, nor Javascript functions. Clearly because I'm not opening on a browser, but on a simple file viewer.

MY QUESTION: Is anyhow possible to open HTML files with a browser (such as Safari) from the iPhone so to be able to see the whole result (CSS, links and JavaScripts included)? I've already tried the "Open this file on..." function on Dropbox, but it doesn't show me Safari as an app that accepts that kind of file.

Thanks in advance.

4

If you try to accessing the files using the regular sharing feature the HTML file will fail to find it's linked CSS, JavaScript, etc files because of the way that Dropbox generates these sharing links.

However you should have a "Public" folder in your Dropbox. If you drop your files in there and select one you should see a "Copy public link..." option above the file list. If you use that, instead of the "Share" button then your HTML file should find it's linked files.

Illustration of Public folder in Dropbox

  • My problem, unfortunately, is that I don't have a public folder on Dropbox because I've created my account after October 2012. Activating it now requires being a Pro or Business client. Any workaround? – Matteo NNZ Dec 18 '14 at 14:32
  • Maybe a bit cheeky but you could pay for a month, activate your public folder and then downgrade back to the previous level. :) dropbox.com/en/help/158 – Alistair McMillan Dec 18 '14 at 17:18
  • Somehow it must work without using the "Public" folder. 1Password for example puts a .html file inside its keychain and you can open it without Dropbox including it in a custom viewing frame... – johk95 Apr 8 '15 at 14:47
  • Is the HTML file linking to other files? If so, are the linked files hosted on Dropbox? If so, what do the links look like? – Alistair McMillan Apr 8 '15 at 15:17
1

Try copying the share link of HTML file, paste it into safari, and then change the "www" to "dl". It will try to download the page but since it is an html file it will display the file in your browser instead. Copy the link and you have a functional web page.

Not sure yet if relative file paths work or not, so it not then do the same thing with the CSS and JS files and change the source to the absolute file paths.

You must log in to answer this question.

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