<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5490256440336290894</id><updated>2011-04-21T11:18:13.576-07:00</updated><title type='text'>Elegant Hack</title><subtitle type='html'>It was the best of code.  It was the worst of code.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://eleganthack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5490256440336290894/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://eleganthack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Josh</name><uri>http://www.blogger.com/profile/04260309971152360156</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://webcosa.com/herosmall.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5490256440336290894.post-856086479252524975</id><published>2007-01-22T11:27:00.000-08:00</published><updated>2007-01-22T11:30:12.697-08:00</updated><title type='text'>Hack #2: When Is A Location Not A Location?</title><content type='html'>Problem: When asking a browser window to reload, the POST object goes along with.  This isn't user friendly (gives an annoying alert) and potentially bad by submitting data twice that should be sent once.&lt;br /&gt;&lt;br /&gt;Solution:  Instead of reload(), use "window.location.href = window.location.href".  Yes, it looks idiotic but since the href is merely a string, this tells the location object to set to itself - but without the offending POST info.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5490256440336290894-856086479252524975?l=eleganthack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://eleganthack.blogspot.com/feeds/856086479252524975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5490256440336290894&amp;postID=856086479252524975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5490256440336290894/posts/default/856086479252524975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5490256440336290894/posts/default/856086479252524975'/><link rel='alternate' type='text/html' href='http://eleganthack.blogspot.com/2007/01/hack-2-when-is-location-not-location.html' title='Hack #2: When Is A Location Not A Location?'/><author><name>Josh</name><uri>http://www.blogger.com/profile/04260309971152360156</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://webcosa.com/herosmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5490256440336290894.post-1819925561939321103</id><published>2007-01-22T11:20:00.000-08:00</published><updated>2007-01-22T11:25:05.041-08:00</updated><title type='text'>Hack #1: Keeping Safari From Crashing Itself</title><content type='html'>Problem: When javascript from an iframe asks to close the layer containing the iframe, Safari (2.0 at least) crashes.  Best guess is that this is because the HTML node which actually triggers the executable javascript is suddenly not there when the javascript enters some kind of return.&lt;br /&gt;&lt;br /&gt;Solution: Don't let the iframe do the work.  Set a timeout and let the container window trigger the javascript to close the window.  Works the same in the end, cross-browser friendly and keeps Safari from crashing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5490256440336290894-1819925561939321103?l=eleganthack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://eleganthack.blogspot.com/feeds/1819925561939321103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5490256440336290894&amp;postID=1819925561939321103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5490256440336290894/posts/default/1819925561939321103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5490256440336290894/posts/default/1819925561939321103'/><link rel='alternate' type='text/html' href='http://eleganthack.blogspot.com/2007/01/hack-1-keeping-safari-from-crashing.html' title='Hack #1: Keeping Safari From Crashing Itself'/><author><name>Josh</name><uri>http://www.blogger.com/profile/04260309971152360156</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://webcosa.com/herosmall.jpg'/></author><thr:total>0</thr:total></entry></feed>
