Difference between revisions of "Useful HTML Code Snippets"
From Free Knowledge Base- The DUCK Project: information for everyone
m (→A working NoCache hack) |
|||
Line 23: | Line 23: | ||
<META HTTP-EQUIV="Expires" CONTENT="-1"> | <META HTTP-EQUIV="Expires" CONTENT="-1"> | ||
</HEAD> | </HEAD> | ||
+ | |||
+ | And to resolve a final Netscape bug, use this Javascript in the body tag: | ||
+ | |||
+ | onLoad="if ('Navigator' == navigator.appName) document.forms[0].reset();" | ||
| |
Revision as of 09:34, 22 January 2009
Eliminate margins on web page
MSIE has one method, and Netscape has another. This will cover both standards.
<BODY topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 ...
A working NoCache hack
Tell browser not to cache web page you are visiting. Simply placing the line:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
in the HTML page HEAD is unreliable. Browsers are buggy and may ignore the directive. Use the following two part method, which involves placing 2 lines in the page HEAD and four lines at the end before the final HTML tag.
Place this at the top between the <HEAD></HEAD> tags:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1">
Please this pseudo head tag set at the bottom after then closing </body> tag and before the closing </HTML> tag:
<HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> </HEAD>
And to resolve a final Netscape bug, use this Javascript in the body tag:
onLoad="if ('Navigator' == navigator.appName) document.forms[0].reset();"