Snippets - usefull code for web

Facebook Twitter

Code Snippets. 10 htaccess Hacks Every SEO Should Know. There’s a lot that you can do with an htaccess file, and of course, things can get pretty advanced in a hurry.

10 htaccess Hacks Every SEO Should Know

Here, we’re going to keep things pretty simple. These are the 10 basic htaccess hacks that every webmaster should know. 1. Force Caching with htaccess. Some Useful JavaScript & jQuery Snippets. How to refresh the src of an image with jQuery?

Some Useful JavaScript & jQuery Snippets

$(imageobj).attr('src', $(imageobj) .attr('src') + '?' + Math.random() ); How to see if an image is loaded or not with jquery var imgsrc = 'img/image1.png'; $('<img/>').load(function () { alert('image loaded'); }).error(function () { alert('error loading image'); }).attr('src', imgsrc); And if a set (example : 10 images) […] How to refresh the src of an image with jQuery? How to see if an image is loaded or not with jquery.