Export to GitHub

reallysimplehistory - issue #7

0.6beta and Safari3/Mac beta


Posted on Oct 25, 2007 by Quick Panda

I tested this on Safari3/Mac beta and it sorta works. It still has the same issue that I had before. I'm running a script that changes the page view under certain conditions and they are defined in the hash. In my script, I check if there is a value for the hash in the URL. If there is, I'll use the add method to add that hash to the history. If there isn't, it doesn't do anything.

This current works fine on FF/Mac. When I hit back to the initial page, it clears all the hash that I have set before. On Safari, when you go back to the initial page, it is still reading the hash from the page before. Is it because I didn't add anything to the hash? I've tried dhtmlHistory.add(""); but that doesn't fix the issue.

Comment #1

Posted on Oct 28, 2007 by Happy Lion

(No comment was entered for this change.)

Comment #2

Posted on Oct 31, 2007 by Happy Lion

Asskkr,

Could you please post your actual source code so I can investigate further? Safari 3/Mac isn't officially supported yet, and Safari 2/Mac has had significant bug fixes in the SVN repo since the 0.6 beta release came out. The final public release will be bulletproof in Safari 2/Mac, but Safari 3/Mac and Safari 3/PC may have to wait a while.

Comment #3

Posted on Oct 31, 2007 by Quick Panda

Here's a snippet what I'm using right now:


url = (typeof url == 'string') ? url : url.href; nurl = url.split("?");

if (nurl[1]) { dhtmlHistory.add(nurl[1]); } else { dhtmlHistory.add("default"); }


What I am doing is inserting the URL string into a function. That function splits up the query and I use the split to insert into dhtmlHistory.add().

The default page doesn't have anything attached to the URL. If the URL string doesn't contain a query symbol, the split function is going to break. I tried to use dhtmlHistory.add(""); to the else statement but that doesn't work on Safari3 and on FF, it just refreshes the page. I'm using dhtmlHistory.add("default"); as a workaround right now and it seems to be working fine that way.

I'm guessing the script just breaks when you're trying to add an empty string into the history.

Comment #4

Posted on Nov 1, 2007 by Happy Lion

Asskkr, I think your problem is that you are trying to:

(a) create a history entry that turns your querystring into its key (b) create a history entry where the key has no corresponding value.

I'd ask you to study the test page to see how best to implement RSH for your application and, if you're still stuck, post your question to the RSH Google Group here:

http://groups.google.com/group/ReallySimpleHistory

I have now tested the latest version of RSH from the SVN repo, and it works great in Safari 3/Mac. I think your issue is one of implementation, not a defect.

Status: Invalid

Labels:
Type-Defect Priority-Medium