Category Archives: HTML

jQuery from Google’s CDN, with local fallback

<!-- Add JQuery from googles CDN -->
<script src="//"></script>

<!-- If it doesn't load, load it locally -->
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')</script>

<!-- Then your custom JS -->
<script src="/js/main.js"></script>

prevent caching of files

Version them in their with their timestamp. This way, when they change, the link will change and the browser will reload the sitemap… Otherwise it will be fine to be cached as it wont have changed.

Cross-browser bookmark link

‘Bookmark Me’ is a sort of IE thing and doesn’t usually work in FireFox, Safari, Chrome, etc.. so as a FireFox user I’ve never bothered with a bookmark links before.
FireFox users know that Ctrl+D is the shortcut for these browsers, and that most ‘Bookmark Me’ links just aren’t work clicking – as they won’t work.

And then I found this…

Continue reading