Abhishek Singh
Abhishek Singh

Reputation: 9765

How can i restrict only one instance of url (http://example.com) to be opened only once on client side?

How can i restrict only one instance of url (http://example.com) to be opened only once on client side ?

I have a link on my site clicking on which opens a new window. How can i restrict only one instance to be opened ?

Upvotes: 1

Views: 504

Answers (1)

s.matushonok
s.matushonok

Reputation: 7585

If all what you want is not to open a new page every time the user clicks a link. You could set a target from "_blank" to some framename, like this:

<a href="http://www.example.com" target="myframename">link</a> 

In that case when user first time clicks the link a browser will open it in a new page with the framename attached to it. The next time user clicks a link. The browser will check that framename is exist and not open a new one, just activate existing.

Upvotes: 3

Related Questions