By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,793 Members | 1,257 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,793 IT Pros & Developers. It's quick & easy.

how to get the privous URL of the browser using javascript

P: n/a
Hi,

I am developing web application.using struts .I want the
javascript code for getting the previous URL of the browser.
any body help me.
Oct 5 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
sh**********@gmail.com wrote in news:eba47e8a-cac8-4215-9728-
6b**********@r15g2000prd.googlegroups.com:
Hi,

I am developing web application.using struts .I want the
javascript code for getting the previous URL of the browser.
any body help me.
Do you want "document.referrer"? That is the link that referred to the
current document, i.e. where we came from.

If the urls are being typed in directly (i.e. the user is not following
links), then there is no way to know. You can direct the browser back to
previous URLs using "window.history", but you cannot know what they are.
Oct 5 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.