473,376 Members | 1,184 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,376 software developers and data experts.

Controlling web browsers with META

Hope this is a proper group for this post :)

I came across this page about META tags that control browsers.
http://www.bauser.com/websnob/meta/browsers.html

Some I know, some I wonder about and would like an opinion on.

For example, the author claims that http-equiv="Content-Style-Type"
and http-equiv="Content-Script-Type" is a echnically "must" to use if
you are using "intrinsic events attributes (like onload or onclick)"
and "if you're using the style attribute to add styles to individual
HTML elements".

There is references only to HTML 4.0 and I wonder if those "must" is
still (if it ever was) a "must"? I can't recall that I ever seen any
page with those META tags.

I'm also interested in the http-equiv="Window-target" META mentioned
on the bottom of the page. I had no knowledge about it before, but it
seems like a good tag to use if it works. But as I understand it only
works on Netscape, maybee not even in the latest versions?

TIA

--
/Arne
Jul 23 '05 #1
13 1753
Arne wrote:
the author claims that http-equiv="Content-Style-Type"
and http-equiv="Content-Script-Type" is a echnically "must" to use if
you are using "intrinsic events attributes (like onload or onclick)"
Correct, according to the HTML spec. It is thus formally required. I
doubt that it has any practical implications.
and "if you're using the style attribute to add styles to individual
HTML elements".
I think this is also correct, but I'd have to check to make sure. It is
consistent with the script-type mandate.
I'm also interested in the http-equiv="Window-target" META mentioned
on the bottom of the page.


What is that supposed to do? Instruct the ua to open all links in a
certain target, I imagine. Sounds like a bad idea.

--
Brian
Jul 23 '05 #2
djn
Arne wrote:
http://www.bauser.com/websnob/meta/browsers.html

There is references only to HTML 4.0 and I wonder if those "must" is
still (if it ever was) a "must"? I can't recall that I ever seen any
page with those META tags.

Actually the 4.01 specs say 'should', meaning that you have to do it
unless you have a solid reason not to.

'Authors should specify the default scripting language for all scripts
in a document by including the following META declaration in the HEAD'
(http://www.w3.org/TR/html4/interact/...default-script)

'Authors should use the META element to set the default style sheet
language for a document.'
(http://www.w3.org/TR/html4/present/s...#default-style)
Jul 23 '05 #3
On Sat, 22 Jan 2005 01:09:38 GMT, djn <de***@kozina.com> wrote:
Arne wrote:
http://www.bauser.com/websnob/meta/browsers.html

There is references only to HTML 4.0 and I wonder if those "must" is
still (if it ever was) a "must"? I can't recall that I ever seen any
page with those META tags.

Actually the 4.01 specs say 'should', meaning that you have to do it
unless you have a solid reason not to.

'Authors should specify the default scripting language for all scripts
in a document by including the following META declaration in the HEAD'
(http://www.w3.org/TR/html4/interact/...default-script)

'Authors should use the META element to set the default style sheet
language for a document.'
(http://www.w3.org/TR/html4/present/s...#default-style)

Curious. That makes the following pretty silly (18.2.1):

type = content-type [CI]
This attribute specifies the scripting language of the element's
contents and overrides the default scripting language. The
scripting
language is specified as a content type (e.g., "text/javascript").
Authors must supply a value for this attribute. There is no default
value for this attribute.

Why say that one should specify a default language and then state that
you must override it? It looks very much like a classic committee
decision.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 23 '05 #4
Once upon a time *Brian* wrote:
Arne wrote:
the author claims that http-equiv="Content-Style-Type"
and http-equiv="Content-Script-Type" is a echnically "must" to use if
you are using "intrinsic events attributes (like onload or onclick)"


Correct, according to the HTML spec. It is thus formally required. I
doubt that it has any practical implications.


That was my thought also, for the reason that the W3C validator don't
complain when there is no sutch META on a page.
and "if you're using the style attribute to add styles to individual
HTML elements".


I think this is also correct, but I'd have to check to make sure. It is
consistent with the script-type mandate.
I'm also interested in the http-equiv="Window-target" META mentioned
on the bottom of the page.


What is that supposed to do? Instruct the ua to open all links in a
certain target, I imagine. Sounds like a bad idea.


As it says on the page I was refering to:

"The Window-target value tells Netscape Navigator that the tagged page
must be loaded in the frame stated in the content attribute. This is
useful, for example, in preventing a page from being framed (by
setting content to _top). Navigator is the only browser that
implements this function of META"

As I see many sites that use frameset load even external pages within
their own frames, it could be useful to prevent sutch bad behaviour.

--
/Arne
http://web.telia.com/~u97802964/

If you owe the bank a million, you have a problem.
If you owe the bank ten million, the bank has a problem! (Unknown)
Jul 23 '05 #5
djn wrote:
Actually the 4.01 specs say 'should', meaning that you have to do it
unless you have a solid reason not to.


Well that's a good escape clause for everyone then. The sheer idiocy
of specifying an "http-equiv" for something HTTP would never recognise
seems ample reason to me. Especially in the absence of real-life
browsers so clueless as to care about it.

--
Nick Kew
Jul 23 '05 #6
In article <PF*******************@newsb.telia.net>,
Arne <us**@domain.invalid> wrote:
That was my thought also, for the reason that the W3C validator don't
complain when there is no sutch META on a page.


The W3C Validator does not care about spec prose. It cares about the DTD
formalism which is inadequate for assessing full spec conformance.

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 23 '05 #7
Once upon a time *Henri Sivonen* wrote:
In article <PF*******************@newsb.telia.net>,
Arne <us**@domain.invalid> wrote:
That was my thought also, for the reason that the W3C validator don't
complain when there is no sutch META on a page.


The W3C Validator does not care about spec prose. It cares about the DTD
formalism which is inadequate for assessing full spec conformance.


It cares about a missing http-equiv for charset, but that's the only
one I'll guess :)
--
/Arne
Jul 23 '05 #8
Dan

Arne wrote:
Once upon a time *Henri Sivonen* wrote:
The W3C Validator does not care about spec prose. It cares about the DTD formalism which is inadequate for assessing full spec conformance.


It cares about a missing http-equiv for charset, but that's the only
one I'll guess :)


That parameter is best given in an actual HTTP header supplied by the
server, rather than a cheap plastic substitute via META tags.

--
Dan

Jul 23 '05 #9
Dan

Arne wrote:
For example, the author claims that http-equiv="Content-Style-Type"
and http-equiv="Content-Script-Type" is a echnically "must" to use if
you are using "intrinsic events attributes (like onload or onclick)"
and "if you're using the style attribute to add styles to individual
HTML elements".


Logically speaking, in the absence of these tags, there's nothing
indicating in what language any style="..." and onclick="..." (etc.)
attributes are in, though there is a tradition that they're in CSS and
JavaScript respectively.

--
Dan

Jul 23 '05 #10
On Sat, 22 Jan 2005, Arne wrote:
Once upon a time *Henri Sivonen* wrote:
In article <PF*******************@newsb.telia.net>,
Arne <us**@domain.invalid> wrote:
That was my thought also, for the reason that the W3C validator don't
complain when there is no sutch META on a page.
The W3C Validator does not care about spec prose. It cares about
the DTD formalism
Right
which is inadequate for assessing full spec conformance.


Just so, The term "validation" has a specialised meaning in SGML
contexts, and should not be confused with all kinds of other
conformance detail.
It cares about a missing http-equiv for charset, but that's the only
one I'll guess :)


Now you're seriously confusing the issue. The validator can't even
start its work without a specification (or assumption) about the
character encoding of the document that it's attempting to validate.
There are several ways to supply that to an HTML validator (via a real
HTTP header; via a meta http-equiv; manually via the user interface to
the validator). (And it's analogous, with some differences, for
XHTML).

This doesn't at all mean that the syntax demands the presence of some
specific meta http-equiv (it demands *no such thing*); but rather,
it's about some pre-requisites which need to be satisfied before the
validation can be started at all.
Jul 23 '05 #11
Once upon a time *Dan* wrote:
Arne wrote:
Once upon a time *Henri Sivonen* wrote:
> The W3C Validator does not care about spec prose. It cares about the DTD > formalism which is inadequate for assessing full spec conformance.


It cares about a missing http-equiv for charset, but that's the only
one I'll guess :)


That parameter is best given in an actual HTTP header supplied by the
server, rather than a cheap plastic substitute via META tags.


What is best is not always possible for everybody, and calling it
"cheap plastic substitute" is easy for someone who have and can
everything. Still, it's better than not have it at all as is the case
in millions of pages.

The problem is that most(?) servers don't give that information with
the header. And most(?) people can't or don't have the access to do
that on the server. I have yet to see (as I recall) a page where this
parameter is missing as http-equiv META in the page, and still
validates because the validator gets the information from the header.

This is of cause my personal experience, and you have probably a
different experience :)

--
/Arne
Jul 23 '05 #12
On Sat, 22 Jan 2005, Arne wrote:
The problem is that most(?) servers don't give that information with
the header.
According to CA-2000-02, that *is* indeed a problem - a *security*
problem. And newer versions of Apache have been putting in some
effort to ensure that the relevant content-types don't get sent out
without an explicit charset specification on their real HTTP header.

And as those updated versions of Apache percolate through, I suspect
you're going to increasingly see an HTTP charset sent out. After
which, you can fiddle with meta http-equiv headers in your HTML till
you're blue in the face, but it won't make a damned bit of difference
to conforming HTTP user agents, since they're mandated to give
priority to the *real* HTTP header.
And most(?) people can't or don't have the access to do
that on the server.
I keep hearing this; but, setting of an appropriate charset value on
the real HTTP header is a fundamental technical requirement for
serious publication on the web.
I have yet to see (as I recall) a page where this parameter is
missing as http-equiv META in the page, and still validates because
the validator gets the information from the header.
Whether you've seen it or not, the real HTTP header *does* work.

If your service provider decides to send out a fixed charset of (say)
iso-8859-1 (or charset=utf-8, whatever they choose) and don't let you
change it, well then, you'll just have to code your page to the
charset which they send out - it's as simple as that.

If they /don't/ send out any charset, then they can be accused of
failing to apply the security guidelines of CA-2000-02. Quite
possibly, someone will find out how to exploit that weakness - and
then, browsers might get security-fixed so that they refuse to work
with documents which lack an HTTP-specified charset (just as MSIE has
recently been fixed in respect of some of its previous misbehaviour
with documents sent as text/plain). And then where will you folks be?

It really is much better to do the job properly from the start, than
to keep applying hansaplast over elastoplast over duct tape...
This is of cause my personal experience, and you have probably a
different experience :)


In *theory* (if you read the early web design documents), it was
anticipated that servers would parse the meta http-equiv markup from
the HTML, and use it to influence the real HTTP headers used for
sending the document out. But in practice that hasn't happened, at
least not to a sufficient extent to be able to rely on it. I could
offer an explanation why that's so - but whatever the explanation, the
end result is what it is - for proper publication of web pages, in
general, one /needs/ the ability to do this amount of configuration of
the real HTTP headers - whether by server configuration (e.g
..htaccess), by server-side scripting (.php or .asp as the case may
be), whatever.

If your service provider short-changes you on that, then you'd be
entitled to complain loudly. But if you want to stay with the
limitations of functionality that they're offering, then you're just
going to have to live with the limitations which that brings in terms
of what you can achieve. Trying to overcome the limitations with
kludges doesn't make for a well-engineered web. You're going to have
analogous problems with getting any meaningful control of
cacheability, too (Mark Nottingham's tutorial applies).
Jul 23 '05 #13
Dan

Arne wrote:
The problem is that most(?) servers don't give that information with
the header. And most(?) people can't or don't have the access to do
that on the server. I have yet to see (as I recall) a page where this
parameter is missing as http-equiv META in the page, and still
validates because the validator gets the information from the header.


Try my pages:
http://www.dan.info/
http://webtips.dan.info/
http://domains.dan.info/
http://mailformat.dan.info/
http://dan.tobias.name/

All of them have proper HTTP headers, no superfluous http-equiv METAs,
and validate. (Yeah, for all the purists out there, it *is* HTML 4.01
Transitional, not Strict, and I *do* still use tables for layout... the
current design is a few years old and I still cared about it looking
good in Netscape 4.x back then... the next redesign, whenever I get
around to it, will change a lot.)

--
Dan

Jul 23 '05 #14

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

Similar topics

111
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: ...
4
by: Christopher Benson-Manica | last post by:
Obviously, compiliant browsers that encounter <script type="text/javascript"> <!-- // your script here // --> </script> will either execute the script or ignore it completely. However, we...
28
by: Xiaotian Sun | last post by:
I added the following line to the header of my html file <meta http-equiv="content-type" content="text/html; charset=utf-8"> hoping browsers will use UTF-8 encoding. But all browsers I tried...
10
by: Andy Dingley | last post by:
I have a large commercial site to rebuild, where the design has been produced by the pixel-counting method. It's also one of those sites where cramming every space full of content is seen as better...
2
by: deja | last post by:
I'm trying to get to grips with CSS and finding it a bit of a nghtmare with cross-browser problems. I am only testing IE6 and Firefox 1.5 so I've hardly touched the surface of what problems I could...
4
by: Amanda H. | last post by:
I need some help with testing, guys. The script I'm using for style sheet switching for my website doesn't seem to work in all browsers correctly. In most Mac browsers, it updates the page...
3
by: musosdev | last post by:
Hi guys I'm using a MasterPage for my website rebuild (vs2005, .net2, c#). I want to be able to control the Title element, both on the MasterPage and the Content pages. For example, on each...
2
by: Hymer | last post by:
Hello, I have a footer at the end of each article in my blog at http://www.usernomics.com/news/user-interface-design-news.html . The footer looks perfect in IE but has smaller text in Firefox...
3
by: Herb | last post by:
I've found how to use javascript to embed a Windows Media Player in a web page. How do I go about controlling the player in response to user input? There should be calls to start, stop and also...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.