Forum Moderators: open

Message Too Old, No Replies

Reload Page Problem

Safari Reload Page Problem

         

Sekka

3:51 pm on Jul 7, 2006 (gmt 0)

10+ Year Member



What's the best way to reload a page using Javascript without resubmitting the POST?

I have an online store where you add an item to the basket, and upon doing this it directs you to the basket. You then have AJAX controls to add/remove items, etc, and upon completion I need my page to reload to refresh the page.

But, when I use the code,

window.location.reload ();

It resubmits the POST from the previous page.

To stop it doing this, I used this code,

window.location = '/basket/#';

The # was needed as without it I would be asking the window location to go the same location and it didn't work.

But, this doesn't work in Safari unfortunately.

So, what is the best way for me to reload the page without resubmitting the POST?

Thank you.

visionmonster

11:52 pm on Jul 10, 2006 (gmt 0)

10+ Year Member



this isn't the exact scenerio, i can't find the bug that is open for this either, i saw it once, but can't recall now

this bug is pretty close:
[bugzilla.opendarwin.org...]

whoisgregg

1:37 pm on Jul 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Adding a query string to the end should do it...

window.location = '/basket/?refresh=true';