Quote:
Originally Posted by JSWolf
One way to optimize things (that works) is to remove all the tabs/spaces in front of all the lines.
You could also shorten the id as long as the id is unique.
|
Yeah, I was planning on doing that, but I want to know WHY it is that I can't remove any of the header things (other than 'just because I say so', or 'because it's written here somewhere.')?
Wouldn't it be nice that you know which lines are mandatory, and which aren't?
Sometimes they say all lines are, but if you can figure most devices can read it even without those lines it's valuable information.
Just like I can display an HTML in most browsers, even without head or data like beneath here.In fact, in most my HTML's I just remove this info, work without (or minimal) class, and css and all that... I only use it if my code benefits from it (if I save writing code, without adding too much complexity).
Example of some lousy HTML code that can easily be removed from the HTML, and with a small rewrite of the HTML codes within the body, will not significantly reduce style of the HTML:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.2 Document//EN" "http://openebook.org/dtds/oeb-1.2/oebdoc12.dtd">
<html xml:lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html;" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> - Intelligent Design by Sharon Lee and Steve Miller</title>
<meta name="Publisher" content="Baen Books" />
<meta name="Copyright" content="2011 by Patrick Lundrigan, Larry Correia, Travis S. Taylor, Robert Buettner, Sharon Lee & Steve Miller" />
<meta name="Author" content="Patrick Lundrigan, Larry Correia, Travis S. Taylor, Robert Buettner" />
<style type="text/css">
p {text-indent:2em;margin-top:0;margin-bottom:2px}
h1 {page-break-before:left}
p.chapter {margin: 135.0px 0.0px 30.0px 0.0px; line-height: 24.1px; font: 28.0px 'Times New Roman'; color: #2e2829; font-weight:bold; text-align:center;}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: center}
span.s1 {font-style: italic}
span.s2 {text-decoration: underline}
</style>
<script type="text/javascript" language="javascript"><!--
function setStyle()
{
if (parent.control) if (parent.control.mainLoad) parent.control.mainLoad(document);
if (window.focus) window.focus();
}
function PNo(PgNo)
{
if (parent.control) if (parent.control.SetPage) parent.control.document.forms[0].PageNo.value = PgNo;
}
setStyle();
//--></script>
</head>
I think the search for smaller,cleaner code is not a bad one,and often overlooked.
Smaller code is the difference between the now near to extinct excite,altavista and yahoo search engines; vs google.