473,473 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

base tag has no effect over <META HTTP-EQUIV="Refresh"

Hello,

any idea why this does not work?
or how do i get this thing to work?

<BASE HREF="http://localhost/thedude/">
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">

I'm adding the <base> tag to the content of an existing html that
contains a redirect meta tag.
I cannot edit the file only add new lines at the top. I use the <base>
tag to handle relative urls with in the existing document.

Thanks,
Udi.
Jul 23 '05 #1
10 7813
Els
Udi Zisser wrote:
Hello,
Hi :-)
any idea why this does not work?
or how do i get this thing to work?

<BASE HREF="http://localhost/thedude/">
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">
Why it doesn't work:

Base *href*. The basis for all href in the page.
There's no href in that meta element.

How to get it to work? No idea, sorry.
I'm adding the <base> tag to the content of an existing
html that contains a redirect meta tag.
I cannot edit the file only add new lines at the top. I use
the <base> tag to handle relative urls with in the existing
document.


How is it that you cannot edit the file yet can add new lines
at the top?
Get your webdesigner to take out the <meta> ? Who put it in
then?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: The Beatles - Love Me Do
Jul 23 '05 #2
Els <el*********@tiscali.nl> wrote:
Udi Zisser wrote:
Hello,
Hi :-)
any idea why this does not work?
or how do i get this thing to work?

<BASE HREF="http://localhost/thedude/">
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">


Why it doesn't work:

Base *href*. The basis for all href in the page.


That can't quite be the explanation, because the BASE URL applies to
SRC attributes in IMG tags as well.
There's no href in that meta element.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 23 '05 #3
Udi Zisser wrote:
Hello,

any idea why this does not work?
or how do i get this thing to work?

<BASE HREF="http://localhost/thedude/">
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">


It might work in *some* browsers, but it isn't valid. The fact is, there is
no HTTP header called "Refresh", so any attempt to emulate it with an HTML
tag is not going to work reliably.

This is what the HTML 4 specification says:
Note. Some user agents support the use of META to refresh the
current page after a specified number of seconds, with the
option of replacing it by a different URI. Authors should not
use this technique to forward users to different pages, as
this makes the page inaccessible to some users. Instead,
automatic page forwarding should be done using server-side
redirects.


So you should use a server-side redirect instead.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #4
On 2 Nov 2004, Udi Zisser wrote:
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">


You are not supposed to write this, naughty boy!
Most readers are pissed off by such META refreshes
because we cannot use the back button any more.

If you need to redirect, use HTTP redirects:
http://www.w3.org/QA/Tips/reback

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 23 '05 #5
Philip Ronan <ph***********@virgin.net> wrote:
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">


It might work in *some* browsers, but it isn't valid.


It is valid. The CONTENT attribute is declated with CDATA content, so
"anything goes".

It's ill-advised and foolish and harmful, but it's surely valid. Use the
word "valid" with caution in HTML context. A validator will not and must
not report the foolishness as an error. (A validator must not even report
an error an error, unless it is a reportable markup error, but that's a
finer point.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #6
Harlan Messinger <hm*******************@comcast.net> wrote:
Base *href*. The basis for all href in the page.


That can't quite be the explanation, because the BASE URL applies to
SRC attributes in IMG tags as well.


And lots of other attributes. In effect, it applies to attributes with
%URI declared content.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #7
On Tue, 2 Nov 2004 17:30:47 +0000 (UTC), Jukka K. Korpela
<jk******@cs.tut.fi> wrote:
Philip Ronan <ph***********@virgin.net> wrote:
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">


It might work in *some* browsers, but it isn't valid.


It is valid. The CONTENT attribute is declated with CDATA content, so
"anything goes".


To clarify - it is a valid value for content, but it would not be a valid
HTTP header AFAIK. Though you're far more expert than I in this area,
Jukka.
Jul 23 '05 #8
Jukka K. Korpela wrote:
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=redirect.html">


It might work in *some* browsers, but it isn't valid.


It is valid. The CONTENT attribute is declated with CDATA content, so
"anything goes".


Valid *HTML*, perhaps.

But not a valid approach for redirecting visitors.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #9
Neal wrote:

[regarding META Refresh]
but it would not be a valid HTTP header AFAIK.


I don't see anything in RFC2616 that prohibits it. Although
HTTP/1.1 does not define a Refresh header, it explicitly
allows for new and experimental headers; in particular,
section 6.2 says:

| Response-header field names can be extended reliably only
| in combination with a change in the protocol version.
| However, new or experimental header fields MAY be given
| the semantics of response-header fields if all parties in
| the communication recognize them to be response-header
| fields. Unrecognized header fields are treated as entity-
| header fields.

http://www.ietf.org/rfc/rfc2616.txt

As a rule, it too is 'ill-advised and foolish and harmful'.

Slainte!

--
Jock
Jul 23 '05 #10
John Dunlop wrote:
Neal wrote:

[regarding META Refresh]

but it would not be a valid HTTP header AFAIK.

I don't see anything in RFC2616 that prohibits it. Although HTTP/1.1
does not define a Refresh header, it explicitly allows for new and
experimental headers; in particular, section 6.2 says:

| new or experimental header fields MAY be given
| the semantics of response-header fields if all parties in
| the communication recognize them to be response-header
| fields.

Since there is no "refresh" header, such a header is experimental per
the rfc you quoted, and cannot be relied upon. Indeed, http is
stateless, so how could there be a "refresh" header? This is a client
side function.

Slainte!


And to you!

--
Brian (remove "invalid" to email me)
Jul 23 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Serguei | last post by:
Dear Experts, I try to use a < character as a part of an attribute value in the following way: ......... <ConditionalStatement seqNumber="5" relationalOp="S<"/> ......... If I try to use the...
22
by: David. E. Goble | last post by:
Hi All; I have a few of these; sigsImages="sigs/finished1.jpg" sigsImages="sigs/foghorn.jpg" lower I have;
1
by: J | last post by:
Hi, Ive got 3 forms, (a subform within a subform within a form) and when I refresh the outermost form, Access closes and offers to send an error report. The forms worked fine a few weeks ago,...
2
by: Serge Klokov | last post by:
Hi! 1. Please, help with example "paint on form by mouse" 2. Below is my example, but it clear the line after each Refresh()... how to fix? 3. How to draw the line in Mouse_Move event? ...
9
by: kai | last post by:
Hi, All I create an ASP.NET page, it contains FirstName textbox and LastName textbox. I setup "enableViewState=false" in page directive. When I enter data in FirstName and LastName textbox,...
6
by: Pealy | last post by:
Hi. I'm trying to get one of the examples from ASP.NET 1.1 Insider Solutions to work in asp.net and i'm getting stuck on using the META tage to do a refresh. I have the following in my HTML...
13
by: Water Cooler v2 | last post by:
What do you mean by a cookieless session state? When you set the sessionState section's cookieless attribute to true in the web.config file, what does that mean? I read this...
17
by: StevePBurgess | last post by:
A really simple script is driving me up the wall. I have a very simply facility on a website to allow the user to reorder items in a database table as she wishes by clicking a link that (in this...
2
by: dazedandconfused | last post by:
Building a site for a client, loaded it up, it works fine in Firefox but presents the below message when loading into ie 6 or ie 5, fine in 7 I think, but the client can not even view it in 7. So...
4
by: Simon | last post by:
Dear reader, If I change the content of a field in an event procedure and in the same procedure I do a refresh, the refresh has no effect. The code in the event is as follows:
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.