how to get the privous URL of the browser using javascript

S

shyamjumberi

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.
 
M

Mike Duffy

(e-mail address removed) wrote in (e-mail address removed):
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top