4.22  Items and Attributes

A Bookmarkshelf(), and all supported browser apps, can contain several types of items: bookmarks, folders, and separators.  We refer to these item types collectively as bookmarks content items, or just content

       Topics on this Page

4.22.1  Bookmarks

A bookmark is a reference to a URL on the internet.  Besides the URL, a bookmark can have several other attributes such as its name, tags, comments (description), shortcut key, lineage, and various statistics.  Bookmarks are called links in Delicious.

4.22.2  Hard Folders

Although they can look similar other folders, most web browsers have two or three of what we call hard folders.  Like the hardware inside your computer, you cannot change the name or location of a hard folder by typing with your keyboard or clicking with your mouse.

To replicate what you see in your web browser, a BookMacster document has hard folders.  You can recognize the hardness because their names are displayed in italics, as shown here:

A BookMacster document may have zero, one, two, three or four hard folders.  Hard folders are usually created automatically when you add clients to a document, and destroyed (if empty) when clients are removed.

In order to map content items during Import and Export operations, BookMacster needs to identify equivalences between its own hard folders and those of web browser apps.  The table below shows the mappings.

The Hard Folders displayed in BookMacster are named to match the name of the Hard Folder in the first (as listed in the Clients tab) of the document’s Clients which has such a folder.  In case that no Client has a Hard Folder corresponding to a given Hard Folder existing in BookMacster, BookMacster defaults to the names used by Safari: Favorites Bar, Bookmarks Menu, Reading List, and My Shared Bookmarks.

A document created as a Central Bookmarks Store, with no clients, will have no hard folders.  This is recommended when using BookMacster as a Central Bookmarks Store, because in this usage there is no need to hamstring yourself with the structure of some web browser.  Instead, you can organize your bookmarks into soft folders that have meaningful names.

You can manually create or destroy any one of the possible four hard folders in the tab Settings > Structure of a Bookmarkshelf Document.  An existing Hard Folder must be emptied out before you can switch if off.

Possible Name as displayed in BookMacster Favorites Bar
or
Bookmarks Bar
Bookmarks Menu
or
Other Bookmarks
Reading List
or
Unsorted Bookmarks
My Shared Bookmarks
Description Appears in the toolbar (near the top) of windows Accessible from the menu A special place to quickly drop new bookmarks which you will put in a better place, later. A special place for bookmarks that will be shared with other people.
Camino Bookmarks Bar Bookmarks Menu - -
Chrome Bookmarks Bar Other Bookmarks - -
Firefox Bookmarks Toolbar Bookmarks Menu Unsorted Bookmarks -
iCab Bookmarks Bar Bookmarks Menu - -
OmniWeb Favorites Personal Bookmarks - My Shared Bookmarks
Opera Bookmarks Bar [Note 1] Note 2 - -
Roccat - - - -
Safari (ver 1-6) Bookmarks Bar Bookmarks Menu Reading List -
Safari (later) Favorites Bar Bookmarks Menu Reading List -
Web Services [Note 3] - - - -

4.22.3  Soft Folders

In contrast to the Hard Folders, we speak of Soft Folders as the regular folders you create in BookMacster or in a web browser app.  For example, folders named News or Vacation Ideas are soft folders that you’ve created.  In contrast the hard folders, you may rename, move or delete soft folders as you wish.

4.22.4  Separators

Separators, also called separator lines, are little “fences” that may be placed between groups of items that are still in the same parent folder.

4.22.5  Attributes

Attributes are the charactertistic of bookmarks and other content items.  For example, some of the attributes of Bookmarks Content items are: name, url, shortcut, tags, comments, date added, visit count.

Although most attributes are self-explanatory, in this section we explain those that are not…

Three URLs

There are three URLs which BookMacster stores for a bookmark:

Current URL is the URL that would currently be used if you clicked Visit, and the URL that would be passed to a Client during an Export.

Suggested URL is likely a better, newer one which BookMacster has received, usually as the result of a redirection from the website, during a Verify operation.

Prior URL is just a holding place for a URL that was replaced, in case you want to revert to it later.

You can see all three URL of a selected bookmark by opening the Inspector panel and opening its bottom drawer.

Clicking one of the buttons on the left will swap the indicated URL values.

Clicking one of the buttons on the right will visit the site addressed by the adjacent URL.

Text Color

In the Inspector Panel, next to the name of the subject item is a rectangle called a color well.  After clicking this color well, you can set the text color which used is to display the item’s name in the Content View, Status Menulet, and contextual menus.  This attribute is not supported by any clients and is therefore not exported.  It is for your use within BookMacster only.

Will be Sorted

This attribute sets explicitly whether or not a particular folder will be sorted when sorting is done.  In addition to the checkbox in the Inspector, this is also indicated by the folder’s background color and symbol in the Content Tab.

Verify Status Codes

The response from a website to a request for a bookmark’s URL normally contains an HTTP Status Code, which is usually a positive integer between 100 and 599, although some creative cowboy webmasters sometimes return their own made-up status codes, usually in the range 600 to 999.

However, “lower level” errors can occur if the site does not send an HTTP response.  These lower level errors are returned to BookMacster by Mac OS X and contain “error codes” in Apple’s NSURLErrorDomain.  The codes in NSURLErrorDomain are negative numbers.

Fortunately (maybe because Apple planned it this way), there is no overlap between these positive and negative values.  Therefore, BookMacster stores in its Verify results for a bookmark what we call a Verify Status Code.  Quite simply, if this value is positive, it’s an HTTP Status Code, and if negative, it’s an error code in the NSURLErrorDomain.

Verify Status Codes for Positive Values (HTTP Status Codes)

Most of the HTTP status codes you will see are defined in Section 10 of Internet Society’s specification HTTP/1.1.  But although it was published in 1999, this document still has not been ratified into a standard, and in the meantime additional codes have been proposed.  For a readable and more complete table of the HTTP status codes in use at this time, we recommend this Wikipedia article.

Verify Status Codes for Negative Values (NSURLErrorDomain)

The following is derived from the file NSURLErrorDomain.h, but we’ve published them here since you will not have that file unless you have installed Apple’s Developer Tools, and also we added the narrative descriptions.


CodeNSURLError:Means that connection failed because:
-999Cancelledit was cancelled.
-1000BadURLit has a bad URL.
-1001TimedOutit took longer than the timeout which was alotted.
-1002UnsupportedURLit has an unsupported URL.
-1003CannotFindHostthe host could not be found.
-1004CannotConnectToHostthe host would not let us establish a connection.
-1005NetworkConnectionLostwe established a connection but it was lost.
-1006DNSLookupFaileddomain name server (DNS) lookup failed.
-1007HTTPTooManyRedirectswe received too many redirects from the server while processing the request.
-1008ResourceUnavailablethe requested resource is not available.
-1009NotConnectedToInternetthis computer appears to not have an internet connection.
-1010RedirectToNonExistentLocationwe were redirected to a nonexistent location.
-1011BadServerResponsewe got a bad response from the server.
-1012UserCancelledAuthenticationthe user cancelled when asked for authentication.
-1013UserAuthenticationRequireduser authentication is required.
-1014ZeroByteResourcethe requested resource contains no data.
-1015CannotDecodeRawDatawe could not decode the raw data.
-1016CannotDecodeContentDatawe could not decode the content.
-1017CannotParseResponsewe could not parse the response.
-1100FileDoesNotExistthe requested file does not exist.
-1101FileIsDirectorythe requested file is in fact a directory.
-1102NoPermissionsToReadFilewe lack sufficient permissions to read the requested file.
-1103DataLengthExceedsMaximumthe length of the requested data exceeds the limit.
-1200SecureConnectionFailedwe could not establish a secure connection.
-1201ServerCertificateHasBadDatethe server’s SSL certificate appears to have expired.
-1202ServerCertificateUntrustedthe server’s SSL certificate is not trusted.
-1203ServerCertificateHasUnknownRootthe server’s SSL certificate has an unknown root.
-1204ServerCertificateNotYetValidthe server’s SSL certificate is not yet valid.
-1205ClientCertificateRejectedthe server rejected our client certificate.
-2000CannotLoadFromNetworkwe could not load from the network.
-3000CannotCreateFilewe could not create a file.
-3001CannotOpenFilewe could not open a file.
-3002CannotCloseFilewe could not close a file.
-3003CannotWriteToFilewe could not write to a file.
-3004CannotRemoveFilewe could not remove a file.
-3005CannotMoveFilewe could not move a file.
-3006DownloadDecodingFailedMidStreamdecoding the downloaded data failed in midstream.
-3007DownloadDecodingFailedToCompletedecoding the downloaded data failed to complete.

HTTP Status Code 302

HTTP Status Code 302 should be returned by a website when there has been a temporary redirect that should not be used permanently.  For example, you may have a bookmark to the Hooterville News newspaper with the url

    http://www.hootervillenews.com/todaysHeadlines

This URL takes you to today’s headlines.  However, you won’t get there directly.  In response, today, their server will send back a response with HTTP Status Code 302, including a redirect to the url:

    http://www.hootervillenews.com/headlines/2009_07_16

which will give you the headlines for today, July 16.  Your browser then visits this redirect URL and renders its data instead of the URL you asked for.

Now. if you click on that same bookmark tomorrow, you will again get a 302 response but will be redirected to a different url:

    http://www.hootervillenews.com/headlines/2009_07_17

which will give you the headlines for tomorrow, July 17.

This example illustrates the correct usage of the 302 status code by the Hooterville News.

Note that, in this case, you would not want to update your bookmark to point to the redirected url, because if you did, you would be reading July 16’s headlines forever.

Last Modified (Date)

Last Modified is an attribute supported by Firefox, Shiira and of course, BookMacster.  It is imported or exported to Firefox or Shiira during an Import or Export operation.

BookMacster updates the Last Modified of an item whenever any of its nontrivial attributes are changed.  In addition, BookMacster updates the Last Modified of a folder whenever it gains or loses a child item.  Therefore, when you move an item from one folder to another, although the Last Modified date of the item itself (or any of its descendants, if it is a folder) is not changed, the Last Modified date of the old and new parent folders are set to the current date and time.

As practiced by Firefox, Last Modifed is the last time that any of the bookmark’s attributes such as Name or Comments (Description) were modified.  Moving the bookmark does not count as a change in attributes, and neither does changing tags (probably because Firefox considers ‘parent’ and ‘tags’ to be ‘relationships’ and not ‘attributes’).  Note that the Last Modified attribute has to do with the bookmark itself and not with the bookmarked website.  That is, Last Modified does not change when the site’s webmaster changes the content of the site.

Finally, note that, as of Firefox 3.5, the Last Modified attribute, although updated as noted above, is not visible in Firefox itself.

Export Exclusions

Bookmarks and folders have an attribute which allows you to exclude the from being exported to selected Clients.  To access these switches, activate the Inspector and click the Export Exclusions drawer button near the bottom.  Checkboxes for all Clients are on by default.

To use this feature,

  or  

Now, the next time you do a normal export, the excluded items will be removed from the browsers whose checkboxes you switched off, and will not re-exported until you switch them back on.

Note that Export Exclusions are attributes of the bookmark or folder and are not Local Settings.  That is, if your Bookmarkshelf document is synced to or copied to other Macs, the same exclusions will apply to the same Clients (and all of their profiles).

Item Quality

When deleting all duplicates or consolidating folders, BookMacster must decide for you which item to keep and which item to delete.  As explained, in those sections, it retains the item with higher quality.  Generally, items are compared two at a time to determine which has higher quality.