You are here

Html file as homepage stored on usb drive

18 posts / 0 new
Last post
Anonymous (not verified)
Html file as homepage stored on usb drive

I would like to know if anyone can help me to set an html file on my usb drive as the home page for PF to open from.
I want to be able to click this stored page and get it to open with portable firefox.
It is important that the page not be online.

Can anyone help me...and please dont get toooo technical with the answers.
Thanks

Rob Loach
Rob Loach's picture
Offline
Last seen: 16 years 3 months ago
Developer
Joined: 2005-12-09 17:29
Relative Files

Although I haven't tried it, you could try putting in "../index.html" to reference Firefox's subdirectory's index.html file (if one exists).

Rob Loach [Website] [Projects]

quanility (not verified)
Cant find anything

I looked and I cant find anything there. Any other ideas?

Ryushi
Offline
Last seen: 16 years 3 months ago
Joined: 2005-12-09 09:30
file:/// seems to be the key

Hi,

to use an local destination/ local file you have to use file:///[driveletter]:/[path]/[file]

[path] and [file] are optional but it seems that [driveletter] is obligatory - I wasn't able to replace [driveletter] with a %variable% like %homedrive% Sad
Hope there is some other way to point to e.g. the bookmarks.html than this "unflexible (=abolute)" link file:///f:/PortableApps/Data/PortableFirefox/profile/bookmarks.html

Cya Ryushi

Bruce Pascoe
Offline
Last seen: 12 years 10 months ago
Joined: 2006-01-15 16:14
Well...

You can use the resource:/// protocol. resource:/// seems to be relative to the directory containing firefox.exe (NOT PortableFirefox.exe), so you could put an HTML file in the directory with firefox.exe and link to it as resource:///homepage.html. However, there doesn't seem to be a way to get to the profile directory (which contains bookmarks.html) using this method.

Ryushi
Offline
Last seen: 16 years 3 months ago
Joined: 2005-12-09 09:30
My dirty workaround

Thanks for the tip with the resource:/// protocol, Bruce.

It is not possible to set the starting page to resource:///.. or any other directory or file "above" the resource:///-"root" (= firefox.exe-directory) Sad
So I changed the starting page to "resource:///redirect.html" and put a "redirect.html" in the firefox.exe-dir to be redirected to the html-file "escape_to_apps_dir.html" in the apps-directory (= 2 dirs above firefox-dir).

redirect.html:
 
<html]
  <head>
    <meta http-equiv="refresh" content="0; URL=../../escape_to_apps_dir.html">
  </head>
  <body>
  </body>
</html>

But it still seems not to be possible to escape the resource:///-root, directly Sad

The only way upside of the resource:///-root is setting the starting page to resource:/// (or any subdirectory), put a redirect html-file into this directory and click on the file "redirect.html".

With the directory structure

PortableApps
   Apps
      PortableFirefox
         firefox
   Data
      PortableFirefox
         profile
            bookmarks.html

you have to redirect to "../../../Data/PortableFirefox/profile/bookmarks.html" to open your "solitary" bookmarks-file.

Cya Ryushi

Spiceskull
Offline
Last seen: 13 years 3 months ago
Joined: 2006-02-05 12:41
HTML With PFF

Hi,

file:///[driveletter]:/[path]/[file] is fine when PFF is being used on one machine, as the [driveletter] stays the same (usually)

However, the whole concept of USB and portable apps is that they work "anywhere" I find that when switching machines (such as work and home) the [driveletter] changes and therefore 'breaks' the relative path.

I would like to use an html file as a 'gateway,' and to date the only solution I have is to bookmark the file twice: page(home) and page(work) which obviously account for the different drive letters.

Surely there must be some type of 'cd../' naming format to make a single file load whatever machine it is on.

Thanks in advance,
Adam.

GrailVanGogh
Offline
Last seen: 13 years 11 months ago
Joined: 2006-01-05 20:08
Perhaps an extension would work

There is this extension that takes all of your bookmarks and makes a nice looking Home Page out of them.

http://bookmarkshome.mozdev.org/

It is almost exactly like the old PC Mag FavsToGo.

You may have to update the install.rdf to make it install on Fx 1.5 or if you use Mr.Tech Local Install it can over ride the extension version check.

Fx 1.5 Portable, Open Office 2.0 Portable, Thunderbird 1.5, Firefox 1.5 Pacifica Branch

Fx 1.5 Portable, Open Office 2.0 Portable, Thunderbird 1.5, Firefox 1.5 Pacifica Branch

Spiceskull
Offline
Last seen: 13 years 3 months ago
Joined: 2006-02-05 12:41
HTML With PFF

Hi,

That sounds good - I'll have a look. Although I must say that I really wanted to make my own homepage from scratch...still, I'm getting to grips with PortaNVU, so I may be able to settle for a halfway measure.

Thanks,
Adam.

John T. Haller
John T. Haller's picture
Offline
Last seen: 12 hours 37 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Why not host it?

Just drop it on your web server. If you don't have one, you can get a free account.

Sometimes, the impossible can become possible, if you're awesome!

Spiceskull
Offline
Last seen: 13 years 3 months ago
Joined: 2006-02-05 12:41
HTML With PFF

Hi John,

Do you mean drop my 'homepage' on my webserver? If so, I don't have a webserver, unless of course you are talking about something like Delicious or similar...

Regards,
Adam.

Nerd
Offline
Last seen: 15 years 7 months ago
Joined: 2006-03-29 17:50
Where can I get a free

Where can I get a free acount?

baelzubaboon (not verified)
Hack for portable home pages

My solution for this problem was to create a batch file to call the PortableFirefox executable:

@echo off
echo user_pref("browser.startup.homepage","file:///%~d0/homepage.html"); > profile\user.js
PortableFirefox.exe

Obviously, this is my version, which should work if one just drops it into the PortableFirefox directory. Then call the batch file to start PFirefox.

Notes of caution:

  • If you are already using the user.js file for some other customization, this will stomp all over that. Be advised.
  • For some reason this seems to allow multiple instances of Firefox to run... I'll have to look in to that.
Bruce Pascoe
Offline
Last seen: 12 years 10 months ago
Joined: 2006-01-15 16:14
...

Can't you just append the line to user.js instead of overwriting the file entirely? Just change the > to a >>. I believe this is how Portable Firefox does it when it adds stuff to prefs.js. It sounds like it would eventually make the file become gigantic, but Firefox seems to strip out duplicate entries.

John T. Haller
John T. Haller's picture
Offline
Last seen: 12 hours 37 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
It is indeed

And that should do it.. (good call Bruce) Firefox actually uses the LAST instance of a pref in the prefs.js. So, even if the homepage is specified earlier, it will ignore that one and use the second one.

I have a new PFF launcher that add in the ability to set a local bookmarks file (via a simple INI option). I'll be releasing it with PFF 1.5.0.1 as soon as the dedicated server is setup. It's a part of integrating PFF Live into PFF.

Sometimes, the impossible can become possible, if you're awesome!

B BY KB MB GB TB
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-10 17:45
File......

Just go to file, then save page as, then after just go to file and Open
File....

Bruce Pascoe
Offline
Last seen: 12 years 10 months ago
Joined: 2006-01-15 16:14
What in the...?

Please make sure you fully understand a thread before replying to it. You obviously don't here, and this seems to be a common theme with all your "solutions"--they're all irrelevant to the issue in question. I've ignored it thus far, but I can't ignore it any longer.

We're discussing how to set the homepage to bookmarks.html (in the profile directory) in a portable way. Your "solution" doesn't help; you appear to be trying to solve some completely different problem.

iMartyr
Offline
Last seen: 15 years 2 months ago
Joined: 2006-02-11 11:33
seriously... read more

seriously... read more thoroughly

Topic locked