Monday 17 May 2010

HTML <base> Tag

The <base> tag specifies a default address or a default target for all links on a page. Relative links within a document (such as <a href="someplace.html"... or <img src="someimage.jpg"...) will become relative to the URI specified in the base tag irrespective of what is present in the address bar.

The <base> tag goes inside the head element.

The <base> tag is supported in all major browsers.

Differences Between HTML and XHTML

In HTML the <base> tag has no end tag.

In XHTML the <base> tag must be properly closed.

Friday 14 May 2010

Organic search results vs non-organic

Organic search results are listings on search engine results pages that appear because of their relevance to the search terms, as opposed to their being advertisements. In contrast, non-organic search results may include pay per click advertising.

http://en.wikipedia.org/wiki/Organic_search

Calling Page_ClientValidate() from a custom JavaScript function

Page_ClientValidate() is the ASP.NET built-in JavaScript function which is executed to validate the form against validation controls before a postback. Page_ClientValidate() sets Page_IsValid property to false if a validation fails and stops the postback.

Page_ClientValidate() can be called manually from a custom script function to make sure the form passes the validation.

But there can be issues like alerting the error messages twice when this function is called from a custom fuction and onClick of the postback button (which happens automatically).

ViewState - in simple terms

The ViewState is just an encrypted version of what was last sent down, so that next time there is a post to the server, it can all be sent back up as one thing. It can then be used on the server, to see if a field's value changed, etc.

The browser does not care about ViewState, and does not use it to populate the controls.

Password fields lose value during PostBack

This is a security feature. So the password isn't sent down to the browser in clear text.

Monday 10 May 2010

Age calculation JavaScript

var yourAge = currentYearYYYY - dobYearYYYY;

if ((currentMonth - 1 < dobMonth - 1) || (currentMonth - 1 == dobMonth - 1 && currentDay < dobDay))
yourAge --;

----------------------
The following script also will work, but it ignores leap years.

var yourAge = ((currentDate - DOB) / (24*60*60*1000 * 365)) //Remove 365 to calculate DateDiff

SSL Offloading

SSL offloading relieves a Web server of the processing burden of encrypting and/or decrypting traffic sent via SSL, the security protocol that is implemented in every Web browser. The processing is offloaded to a separate device designed specifically to perform SSL acceleration or SSL termination.

SSL termination capability is particularly useful when used in conjunction with clusters of SSL VPNs, because it greatly increases the number of connections a cluster can handle.

BIG-IP® Local Traffic Manager with the SSL Acceleration Feature Module performs SSL offloading.

http://www.f5.com/glossary/ssl-offloading.html