Generate a random GUID

Function generateGuid creates a random GUID (globally unique identifier).

MSDN defines GUID as "a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated."

GUID consists of alphanumeric characters only and is grouped in five groups separated by hyphens as seen in this example:
3F2504E0-4F89-11D3-9A0C-0305E82C3301

Check if the string is a valid session id

Another article devoted to validation of strings. In this case a function, which validates if the supplied string is a valid session id.

The format is very similar to an md5 hash with only one difference - the session id consists of 26 alphanumeric characters.

Check if the string is a valid GUID

This function checks if the supplied string is a valid GUID.

MSDN defines GUID as "a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated."

GUID consists of alphanumeric characters only and is grouped in five groups separated by hyphens as seen in this example:
3F2504E0-4F89-11D3-9A0C-0305E82C3301

Check if the string is a valid md5 hash

A function to check if a string is a valid MD5 hash. That means that the string must be 32 characters long and can only consist of letters and numbers.

Send no-cache headers

A function for occasions when you need to ensure that the page is not cached.

Usually developers include a list of header functions at the top of the page to avoid caching. Here is a small function which you can call instead. You will not have to remember all those Last-Modified and Cache-Control statements anymore.

Showing 21 - 25 of 27 results