Random Web Development and Web Designer Tips
More Web Development and Web Designer Tips added every day. Come back Soon...
Close button script.
<a href="javascript:window.close();"><img src="images/but_close.gif" border="0" width="74" height="18" vspace="10" alt="CLOSE"></a>
Some browsers will close only window if it was open as pop-up.
Show text inside search box.
<input onfocus="this.value=''" type="text" value="some text" />
<input onfocus="this.select()" type="text" value="some text" />
This gives the user to amend text that they have put in, without having to rewrite it completely if they go back to the box.
Div left – Div Right.
<div align=”center”>
<div style=”width:70%; float:left;”>
some text on the right
</div>
<div style=”width:29%; float:right;”>
some text on the left
</div>
Advise it to keep it less then 100% total width.
Frame Kill
Copy this code and paste it between the <head> and </head> tags of your page (after “title”)
-
<SCRIPT TYPE="text/javascript"> -
- <!--
if (top.frames.length!=0)
// -->
top.location=self.document.location;
</SCRIPT>
This code makes your Web page stay in its own full screen window.
http://docs.law.gwu.edu/facweb/claw/Kill’frames.htm
Best Practices for Speeding Up Your Web Site
Submitted by reader:
* Minimize HTTP Requests* Use a Content Delivery Network
* Add an Expires or a Cache-Control Header
* Gzip Components
* Put Stylesheets at the Top
* Put Scripts at the Bottom
* Avoid CSS Expressions
* Make JavaScript and CSS External
* Reduce DNS Lookups
* Minify JavaScript and CSS
* Avoid Redirects
* Remove Duplicate Scripts
* Configure ETags
* Make Ajax Cacheable
* Flush the Buffer Early
* Use GET for AJAX Requests
* Post-load Components
* Preload Components
* Reduce the Number of DOM Elements
* Split Components Across Domains
* Minimize the Number of iframes
* No 404s
* Reduce Cookie Size
* Use Cookie-free Domains for Components
* Minimize DOM Access
* Develop Smart Event Handlers
* Choose over @import
* Avoid Filters
* Optimize Images
* Optimize CSS Sprites
* Don’t Scale Images in HTML
* Make favicon.ico Small and Cacheable
* Keep Components under 25K
* Pack Components into a Multipart Document