Creating a JavaScript “Set As Homepage” Link
The unfortunate part about creating websites for customers is that no matter what recommendation I make, if they want it, I have to give it. Thus is the case with recently adding a "Set As Homepage" link to a customer's website. Homepages are much more useful to the user when they're set to Google, Yahoo!, another portal, or they're webmail. To each their own, I guess, so here's how you create a "Set As Hompage" link using JavaScript.
The JavaScript
function set_homepage()
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('https://davidwalsh.name');
}
I don't want to say that this link is tacky necessarily, but I think it's a bit obnoxious. If the user wanted your site to be their homepage, you wouldn't have to ask them. Also note that this only works in Internet Explorer.
For maximum performance, we all know we must put our assets on CDN (another domain). Along with those assets are custom web fonts. Unfortunately custom web fonts via CDN (or any cross-domain font request) don't work in Firefox or Internet Explorer (correctly so, by spec) though...
CSS filter support recently landed within WebKit nightlies. CSS filters provide a method for modifying the rendering of a basic DOM element, image, or video. CSS filters allow for blurring, warping, and modifying the color intensity of elements. Let's have...
I love that JavaScript toolkits make enhancing web pages incredibly easy. Today I'll cover an effect that I've already coded with MooTools: creating a Twitter-style animated "Sign In" button. Check out this five minute tutorial so you can take your static...
CSS sprites are all the rage these days. And why shouldn't be? They're easy to implement, have great upside, and usually take little effort to create. Dave Shea wrote an epic CSS sprites navigation post titled CSS Sprites2 - It's JavaScript Time.
bodoh kau ni jang…
I guess this only works below IE7 ?
i have put that in website, works in IE but not on FF or chrome! :(
it doesn’t work on latest version of browsers
I think . it may work in older version of all the browsers.