Posts

Showing posts from May, 2011

How to clear Facebook Share’s Cache

Facebook share is good, simple, lets us share almost everything on web in seconds. But Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared or the description of the page because facebook still shows the older version of the page.

Get URL Parameters Using Javascript

<script> function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } alert('Query Variable ' + variable + ' not found'); } </script> Now make a request to page.html?x=Hello <script> alert( getQueryVariable("x") ); </script>

Jquery Validation with custom message

You can validate the HTML form using the Jquery with your custom error message. This is very easy to implement and require little knowledge of jquery.