469,271 Members | 1,551 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Re-Write the URL using $_SESSION vars

nathj
938 Expert 512MB
Hi,

I have been working on site for the last month and in terms of tech development it's now done, I'm waiting for final content.

While I wait I am playing around with some other ideas.

Each page on this site is loaded through AJAX so the URL never changes. However, if the URL contains two parameters then a specific page is loaded when the site boots up. This enables me to send out page specific links.

Every time a new 'page' is loaded two $_SESSION variables are updated to store the ID's that would be needed to get teh relevant page information from the DB. It would great if I could then write those to the URL so that bookmarking and browser history become available.

The trick is that I don't want to refresh the page to do this - that would defeat the point of having done this using AJAX.

Does anyone have any suggestions? I have spent a lot of time reading around on this subject and I have found nothing that has made much sens to me.

Well now I've asked my question I best go see if there's a question or two I can answer.

Cheers
nathj
Jul 23 '08 #1
3 1669
Atli
5,058 Expert 4TB
Hi.

Sounds to me like you need JavaScript to edit the URL the browser is displaying?
That's more of a JavaScript thing, so I'll move this over to the JavaScript forum.
Jul 23 '08 #2
acoder
16,027 Expert Mod 8TB
You could try using the location.hash property.

There are some implementations, e.g. RSH (Really Simple History). You may also find this link useful.
Jul 29 '08 #3
nathj
938 Expert 512MB
You could try using the location.hash property.

There are some implementations, e.g. RSH (Really Simple History). You may also find this link useful.
Hi,

Thanks for the pointers. I had started playing around with the # idea - this at least allows bookmarking before any more advanced modifications to allow the back button to function.

Cheers
nathj
Jul 29 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Nel | last post: by
4 posts views Thread by Craig Bailey | last post: by
1 post views Thread by Chris | last post: by
11 posts views Thread by James | last post: by
4 posts views Thread by Alan Walkington | last post: by
1 post views Thread by John Ryan | last post: by
8 posts views Thread by Beowulf | last post: by
1 post views Thread by joost | last post: by
1 post views Thread by Clarice Almeida Hughes | last post: by
2 posts views Thread by JW | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.