promisefeni / reallysimplehistory

Automatically exported from code.google.com/p/reallysimplehistory
Other
0 stars 0 forks source link

0.6beta and Safari3/Mac beta #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by ass...@gmail.com on 25 Oct 2007 at 10:30

GoogleCodeExporter commented 8 years ago

Original comment by bdpathfi...@gmail.com on 28 Oct 2007 at 6:03

GoogleCodeExporter commented 8 years ago
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.

Original comment by bdpathfi...@gmail.com on 31 Oct 2007 at 4:15

GoogleCodeExporter commented 8 years ago
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.

Original comment by ass...@gmail.com on 31 Oct 2007 at 5:41

GoogleCodeExporter commented 8 years ago
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.

Original comment by bdpathfi...@gmail.com on 1 Nov 2007 at 10:32