Can history.go also refresh the destination?

I've seen related questions asked a number of times, but I haven't yet seen an answer that does what I need to do.  I display a shopping cart summary block only when the cart contains items.  So when an item is added to the cart, I want to return to the page from where the item was added and show the summary block.  I now use javascript:history.go(-1)(), but you have to hit refresh when you get back to that page.  Can this history call somehow be comibined with location.reload() to cause that history page to refresh itself?  Or is there another solution to this most common of problems?  I'm using ASP if that matters, or if there's a better way to do it.

Thanks!
TexSoftAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NetGrooveCommented:
Put this metas on your catalog pages:

<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="cache-ontrol" CONTENT="private">
<META HTTP-EQUIV="cache-control" CONTENT="no-cache">
<META HTTP-EQUIV="expires" CONTENT="0">

And beside the refresh metas is the better way to pass the referrer URL to shoping cart page.
With this URL you can jump back to referrer directly without history steps calculation.

TexSoftAuthor Commented:
Thanks, NetGroove.  Can you help me understand what you mean when you say " the refresh metas is the better way to pass the referrer URL.  With this URL you can jump back to referrer directly without history steps calculation."?  I'm not sure how these metas affect the url other than not caching the page.

Thanks!

NetGrooveCommented:
Reading my statement in that part does not make any sense :)

Ok, that were two statements:
1.) Use the METAs to make your referring page refresh.
2.) Use referrer address passing to shopping cart page go back to referrer page. Jumping back to referrer page by using its URL is better then calculating history back steps.

Direct jumping to referrer page URL will also refresh your referrer page, even without using the refresh metas.

Does this make sense to you?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TexSoftAuthor Commented:
Thanks for the clarification!

One follow-up, if you don't mind.  I guess I'll have to capture the referrer page URL in a session var.  If I use that method, what's your take on using the META's to not cache?  It sounds like I wouldn't need them, and that might save a little bandwidth.

Thanks again for your help -- I really appreciate it.
NetGrooveCommented:
Thanks for the points.

No, it does save band wide. It increases the traffic.
With caching set to on, that is depending on browser setting defaults, your browser checks the page headers to see whether they were changed since last fetch and they has to fetch the complete page again and use extra band wide.
The upper metas do say: do not make the header check for saving band wide and transfer always the full pages.
With that metas you ensure to have always the pages up to date, but you transfer the pages always and every time.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.