Tag Archives: browser

jQuery: Change Doctype

There are a few things you might want to know if you’re looking to change the document type (doctype) using jQuery or Javascript. First, doctype is listed as a property in the W3C documentation, and is defined as read-only: interface Document : Node { readonly attribute DocumentType doctype; readonly attribute DOMImplementation implementation; readonly attribute Element documentElement; Element createElement(in DOMString tagName) raises(DOMException); DocumentFragment createDocumentFragment(); While it may be possible to insert a doctype with javascript / jquery above the HTML tag, it is not advisable to do so. Sample code which would do this might look like: <!– no doctype, loads in Quirks Mode (BackCompat) –> <html> <!– rest of the document, then at the end: –> <script> alert(‘now in compatMode ‘+document.compatMode); if (document.compatMode===’BackCompat’) { setTimeout(function() { var markup= document.documentElement.innerHTML; markup= ‘< !DOCTYPE html><html xmlns=”http://www.w3.org/1999/xhtml” lang=”en” xml:lang=”en”>’+markup+'</html>’; document.open(); document.write(markup); document.close(); }, 0); } </script> </html> via

Posted in Tech Tips, Web Development | Tagged , , , , , , | Leave a comment

Google Search Lucky

Google’s “I’m Feeling Lucky” search in Google Chrome Do you want to use Google’s “I’m Feeling Lucky” search in Google Chrome? It’s easy using the custom search engines. In Google Chrome click the wrench icon and then choose prferences next click manage custom search engines Inser the string(s) below and a name (pretty much irrelevant) and they shortcut keyword you want to use. I use > Google Search Lucky Strings Standard “Im Feeling Lucky” Search http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky SSL Encrypted “Im Feeling Lucky” Search https://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky Note: I’ve stripped out all items such as encoding and referrer to keep this as clean and simple as it can be. Now you can simply type in something like > Google Docs into your browser bar and have it go to the first result – which is most likely the right place.

Posted in Mac, Software, Tech Tips, Web Development | Tagged , , , , , , , , , , | 2 Comments

Elinks User Agent Override

To manually set the useragent for the e-links web browser, edit this file: ~/.elinks/elinks.conf The syntax for setting or overriding the user agent is something like this: set protocol.http.user_agent = “Firefox/2.0.0.4” Or possibly this for a more realistic agent string: set protocol.http.user_agent = “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060426 Firefox/1.5.0.4”

Posted in Web Development | Tagged , , , , , , , | Leave a comment

Google Chrome: Disable Automatic Updates

Are you tried of Google Chrome automatically installing updates? You can disable it on both Windows and Mac machines: Windows Machines Open registry editor. Locate: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update Add a new DWORD value named DisableAutoUpdateChecksCheckboxValue and set it to 1 to disable automatic updates or 0 to re-enable them. Mac OS X Open terminal and run the following command: defaults write com.google.Keystone.Agent checkInterval 0 To re-enable automatic updates for google chrome use this command: defaults write com.google.Keystone.Agent checkInterval 18000 This also works for Chromium and beta versions of GoogleChrome.

Posted in Mac, Tech Tips, Web Development | Tagged , , , , | Leave a comment

Firefox 4 Artwork

Posted in Tech Tips, Web Development | Tagged , , | 4 Comments

Bigger Gmail Compose Box

Posted in Software, Tech Tips, Web Development | Tagged , , , , , , , , | 24 Comments