Detect if visitor is on index page with client side scripting
Posted
by sterling
on Stack Overflow
See other posts from Stack Overflow
or by sterling
Published on 2010-03-19T19:04:39Z
Indexed on
2010/03/20
1:01 UTC
Read the original article
Hit count: 449
Is it possible to detect if a visitor is on the index page or domain root with client side scripting?
I figure javascript would be the best method as I would like to append a value to an image file based on wether a visitor is on the home page or not.
Non-index page:
<img src="/img/logo.png" />
Index page:
<img src="/img/logo-home.png" />
© Stack Overflow or respective owner