What is a Container Freesite?
Freesite is a Freesite with most of it's files contained in a zip file.
What are the advantages/disadvantages?
A whole Container
Freesite as explained here would typically only contain three files:
- index.html - The container loader (required because of a bug in the container implimentation)
- activelink.ext(where .ext is one of png, gif or jpg) - This is the activelink image for your site, it should be kept out of the container to avoid causing slowdowns in sites linking to your Freesite, if you don't do this you might just piss people off and get no links to your site
- container.zip - This is the Freesite Container where most of your site files are located, it must be less than 1 Megabyte or it won't work
Some of the advantages of this are:
- Much faster Freesite insertions
- Pages elements(graphics, stylesheets, subpages etc.) load together as one unit which allows an entire page to load quickly because the elements are not retrieved individully(see disadvantages for caveats about this)
- Much better retention of Edition and One-shot Freesites, The page is one unit, so as long as the container and it's loader are available the entire page will be available, even one year from now as long as those two things are retrievable the page will not be broken
Some disadvantages are:
- A Freesite of say five or less elements will probably no see much benefit from a container
- Because of unaddressed caching problems container Freesites will sometimes not completely load and require being reloaded 1 or more times, so although containers still work better than non-containered sites loading is not as smooth as it should be.
A Container Freesite Step-by-Step
taken from TFE; former text was outdated (loader), see at bottom
Container freesites are not exactly a new feature of Freenet, but until fairly recently there were a number of complications with their usage that prevented them being useful to many freesite authors. That is however no longer the case.
A container freesite is essentially a freesite where all, or more commonly part, of it's content is stored within a (usually) single zipped archive key. The advantage of doing this is that certain file types can be greatly compressed into keys that will move through Freenet more easily. More significantly however it means many virtual keys can be fetched at the same time within the same zipped archive, speeding up the display and navigation of many freesites dramatically. Careful usage of container freesite capabilities can allow the more advanced freesite authors a greater degree of freedom in structuring their freesite that would otherwise be penalised by the slow process of fetching a larger number of individually inserted content keys.
The commonly used freesite insertion tool FIW currently supports the automatic creation of container site components, but as the feature was added as something of an afterthought it can be tricky to use at first. You must add the relevant activation commands to the parse/priority settings edit box of the relevant wizard page for your chosen freesite project. Some instructions are provided in the FIW information window, but in most cases the following should be enough to quickly turn most freesites into efficient container users:
- exact:Active Link.jpg:1
These instructions will basically cause FIW to bundle all files ending in .htm, .html, .txt, and .css into a single zip archive key called c.zip. These are the file types most likely to benefit from being moved into a container. The given commands will also specifically not include the named Active Link
image in the container. It's worth being specific about not including the Active Link
in case you later decide to bundle some of your site's other images together. Including your Active Link
image in a container could also be considered abuse because it forces a user to silently download your freesite without them giving more direct consent.
Note also that FIW will automatically handle the link changes to your keys within your freesite's manifest without requiring you having to edit any of your existing HTML to be aware of those changes.
- For a container site your index.html file must be a container loader, you should rename your current index.html to main.html and fix any any local links to it (external links will be automatically redirected to it)
- Create the loader, the following should be the contents of the loader:
- You can cut & paste into a text editor(like Notepad) then save as index.html in your site folder:
<frame name="No Name" noresize src="container.zip//main.html">
Sorry, this browser does not support frames.
- Or download index.txt and rename to index.html
- Or use "Save As" in your browser to save the index.html from this page you are reading, it's identical
3. Download Freesite Insertion Wizard and follow the directions to install it and set up your Freesite for insertion
4. Highlight your Freesite and 'Edit an Existing Project', go to the parsing screen (see picture below) and add (cut&paste) the following information into the large input box. This will set up the commands to create the Container
Caution: If you are using FIW0.07 for the first time be sure to add a NIM prefix here even if you don't use it, there is a little bug in FIW that may cause your inseertions to stall.
5. You can now also add parsing tags to the index.html and main.html as described in FIW and the templates.html document in your Freesite Insertion Wizard folder
Note:This will work for DBR, Edition or One-Shot Freesites