Aahhh. I knew there must be something I was missing in the requirement.
I don't think you need something to handle folks doing a browser refresh. I think you need a little "refresh contents" link in the floatbox caption. Yes? No?
Such a link is not too hard. The caption can take html, that html can be an anchor, and that anchor can contain an onclick action to reload the current content in the same (existing) box. Here's how to do it.
We're looking to build an anchor that runs the following code:
parent.fb.loadAnchor(parent.fb.currentItem.href, parent.fb.currentItem.rev + ' sameBox:true');That code should be fairly obvious what it's doing. We just need to wrap it in an anchor so it can fire when clicked.
<a href="#" onclick="parent.fb.loadAnchor(parent.fb.currentItem.href, parent.fb.currentItem.rev + ' sameBox:true'); return false;">refresh contents</a>But a caption can not directly accept this html code. It (usually) messes up the browser's parsing of the page. So we have to escape the html entities in that caption string. < becomes < > becomes > and " becomes " It starts to look a little ugly but is still conceptually simple.
<a href="#" onclick="parent.fb.loadAnchor(parent.fb.currentItem.href, parent.fb.currentItem.rev + ' sameBox:true'); return false;">refresh contents</a>The cut-and-pasteable caption option built from this looks like:
caption:`<a href="#" onclick="parent.fb.loadAnchor(parent.fb.currentItem.href, parent.fb.currentItem.rev + ' sameBox:true'); return false;">refresh contents</a>`
(Note that the backquotes are required for correct parsing.)
And finally, an anchor with that caption pasted into its rev attribute might look like this:
<a href="myBlog.php" rev="caption:`<a href="#" onclick="parent.fb.loadAnchor(parent.fb.currentItem.href, parent.fb.currentItem.rev + ' sameBox:true'); return false;">refresh contents</a>`">my blog</a>