468,752 Members | 1,263 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,752 developers. It's quick & easy.

OT?: framesets, redirects, and URL address

Hey folks,

I have my entire ASP-driven site in a one-frame frameset to preserve a
static URL in a browser's address bar. I also have a customized 404 page to
redirect a visitor to the top, default frameset. The redirect works, but the
called, nonexistent URL remains in the browser's address bar. Is there any
way to refresh a browser's address in the address bar to that of the site's
default, frameset address? I tried using a window.location-type javascript,
but the redirects get stuck in a perpetual loop.

Thanks for any advice,

Dave
Jul 22 '05 #1
10 1897
David Shorthouse wrote:
I have my entire ASP-driven site in a one-frame frameset to
preserve a static URL in a browser's address bar. I also have a
customized 404 page to redirect a visitor to the top, default
frameset. The redirect works, but the called, nonexistent URL remains
in the browser's address bar. Is there any way to refresh a browser's
address in the address bar to that of the site's default, frameset
address?


Why does it matter?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #2
David Shorthouse wrote:
I have my entire ASP-driven site in a one-frame frameset to
preserve a static URL in a browser's address bar. I also have a
customized 404 page to redirect a visitor to the top, default
frameset. The redirect works, but the called, nonexistent URL remains
in the browser's address bar. Is there any way to refresh a browser's
address in the address bar to that of the site's default, frameset
address?


Why does it matter?


Well, because if someone were to have visited the site via a non-existent
URL, been given my customized 404 page with a redirect to the default site,
the address in their address bar would still read that of the non-existent
URL.

Dave
Jul 22 '05 #3
David Shorthouse wrote:
Why does it matter?


Well, because if someone were to have visited the site via a
non-existent URL, been given my customized 404 page with a redirect
to the default site, the address in their address bar would still
read that of the non-existent URL.


Again, why does that matter? Who CARES what is in the address bar?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #4
>>> Why does it matter?

Well, because if someone were to have visited the site via a
non-existent URL, been given my customized 404 page with a redirect
to the default site, the address in their address bar would still
read that of the non-existent URL.


Again, why does that matter? Who CARES what is in the address bar?


Humpff....okay. If someone were to then bookmark the address, they'll be
bookmarking the dead URL instead of the correct, default address. On every
return to the site from their bookmark, they'll always first see the 404
page then be redirected. All I want to do is avoid this and ensure that
visitors (if they choose to bookmark after having typed a nonexistent URL in
the address bar) have the correct URL in their bookmark listing.

Dave
Jul 22 '05 #5
Gazing into my crystal ball I observed "David Shorthouse"
<da*************@shawyourclothes.ca> writing in
news:ec**************@TK2MSFTNGP11.phx.gbl:
Why does it matter?

Well, because if someone were to have visited the site via a
non-existent URL, been given my customized 404 page with a redirect
to the default site, the address in their address bar would still
read that of the non-existent URL.


Again, why does that matter? Who CARES what is in the address bar?


Humpff....okay. If someone were to then bookmark the address, they'll
be bookmarking the dead URL instead of the correct, default address. On
every return to the site from their bookmark, they'll always first see
the 404 page then be redirected. All I want to do is avoid this and
ensure that visitors (if they choose to bookmark after having typed a
nonexistent URL in the address bar) have the correct URL in their
bookmark listing.


That's one of the problems with using frames, and why most developers stay
away from them. Google for Frames Are Evil.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #6
That's one of the problems with using frames, and why most developers stay
away from them. Google for Frames Are Evil.


True, but I make use of www.dyndns.org because I haven't got a static IP on
which I am hosting my site. DynDNS has an option to mask an URL by using
framesets and, should I ever get my own Domain, it would be a snap just to
change the daughter address. In the meantime, I'm just wondering if it is
possible to do what I am asking. I do have an include file on my pages that
pop a visitor back into the frame should they ever visit the daughter pages
after having done a Google search, so that aspect of things is (relatively)
taken care of.

Dave
Jul 22 '05 #7
Gazing into my crystal ball I observed "David Shorthouse"
<da*************@shawyourclothes.ca> writing in
news:OE**************@tk2msftngp13.phx.gbl:
Hey folks,

I have my entire ASP-driven site in a one-frame frameset to
preserve a
static URL in a browser's address bar. I also have a customized 404
page to redirect a visitor to the top, default frameset. The redirect
works, but the called, nonexistent URL remains in the browser's address
bar. Is there any way to refresh a browser's address in the address bar
to that of the site's default, frameset address? I tried using a
window.location-type javascript, but the redirects get stuck in a
perpetual loop.

Thanks for any advice,

Dave


First, as you are I am sure aware, this is not a client side group.

Second, why are you using frames in the first place? Frames have many
problems, bookmarking, orphan pages in search engines (especially if
javascript is unavailable on the client), search engines, etc.

If you are trying to preserve the static URL in the user's address bar, is
this to keep the person from seeing querystrings and the like? Trust me,
those who want to get to the real page can, easily. View source will give
them the real URL, they can turn off javascript and happily surf around
with all the information you want to hide.

Use other methods, post, session variables, or use check sum or MD5 to
check for invalid values.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #8
Adrienne,

I'm well aware of the downsides to framesets. See my earlier post for my
reasons. This is also why I have OT in the subject of my original
post....this is a pretty active group, I have received some good advice for
other matters, so I thought someone would be kind enough to point me in the
right direction.

Dave
First, as you are I am sure aware, this is not a client side group.

Second, why are you using frames in the first place? Frames have many
problems, bookmarking, orphan pages in search engines (especially if
javascript is unavailable on the client), search engines, etc.

If you are trying to preserve the static URL in the user's address bar, is
this to keep the person from seeing querystrings and the like? Trust me,
those who want to get to the real page can, easily. View source will give
them the real URL, they can turn off javascript and happily surf around
with all the information you want to hide.

Use other methods, post, session variables, or use check sum or MD5 to
check for invalid values.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #9
David Shorthouse wrote on 01 feb 2005 in
microsoft.public.inetserver.asp.general:
I'm well aware of the downsides to framesets. See my earlier post for
my reasons. This is also why I have OT in the subject of my original
post....
Off topic is NOT done for new questions that are outside the scope of a NG,
especially since there are many NGs in which such questions are on topic.
this is a pretty active group, I have received some good
advice for other matters, so I thought someone would be kind enough to
point me in the right direction.


Please be kind enough not to disrupt the topicity of such NG and thereby
degrade it's usefullness and so it's praised [by you] activeness.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #10
David Shorthouse wrote:
Humpff....okay. If someone were to then bookmark the address, they'll
be bookmarking the dead URL instead of the correct, default address.
On every return to the site from their bookmark, they'll always first
see the 404 page then be redirected.
Now we're getting somewhere. If that's your desire, then *TELL* the user he
has followed a dead link, provide a new link, and DO NOT redirect him.
All I want to do is avoid this and ensure that visitors (if they
choose to bookmark after having typed a nonexistent URL in the
address bar) have the correct URL in their bookmark listing.


In the above scenario, the user has *already* navigated to your site via a
dead link. Failing to tell him so will ensure he does it again.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by x | last post: by
5 posts views Thread by Martin Franklin | last post: by
5 posts views Thread by terry | last post: by
2 posts views Thread by Andy Fish | last post: by
5 posts views Thread by Advo | last post: by
4 posts views Thread by lashnjo | last post: by
1 post views Thread by Mark Rae | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.