Useful HTML Code Snippets: Difference between revisions

From Free Knowledge Base- The DUCK Project
Jump to navigation Jump to search
New page: == 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 ... &nbsp...
 
No edit summary
Line 3: Line 3:


  <BODY topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 ...
  <BODY topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 ...
&nbsp;
== 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>


&nbsp;
&nbsp;

Revision as of 08:32, 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>