Recent activity
Subscribe to this feed
Joachim De Lombaert marked one of Eric Suesz's replies in Get Satisfaction as useful. Eric Suesz replied to the problem "Widget cannot be loaded asynchronously due to document.write".
Joachim De Lombaert reported a problem in Get Satisfaction on August 03, 2009 06:44:
No Expires header on widget resources (no browser caching)The following URLs used by the Feedback Widget do not have a far-future Expires header set on Amazon S3:
http://s3.amazonaws.com/getsatisfacti...
http://s3.amazonaws.com/getsatisfacti...
http://s3.amazonaws.com/getsatisfacti...
http://s3.amazonaws.com/getsatisfacti...
http://s3.amazonaws.com/getsatisfacti...
This causes them to be re-fetched by the browser on almost every page view. This unnecessary reloading impacts the performance of the website with the Feedback Widget installed. Since most of these are images and therefore are unlikely to change, there's no need to have the user's browser constantly re-download them. The Javascript file can also be cached: it changes rarely, plus it's versioned with the URL.
By the way, setting an Expires header would mean that if a user visited *any* site with the Feedback Widget, the resources would be cached even for subsequent visits to other sites.
Here's an example header that should work:
Cache-Control: max-age=604800
References:
Tip 4: http://www.labnol.org/internet/amazon...
http://www.drunkenfist.com/304/2007/1...
Joachim De Lombaert replied on August 03, 2009 05:36 to the problem "Widget cannot be loaded asynchronously due to document.write" in Get Satisfaction:
You know what - I spoke too soon. I was looking at the code again to see if I could find a way around it, and it turns out there's already a workaround built into the code.
Setting a container ID changes the behavior of the Feedback Widget and makes it use innerHTML instead of document.write(). That solves the problem!
feedback_widget_options.container = "gsContainerID";
Thanks anyway for your willingness to help.
Joachim De Lombaert reported a problem in Get Satisfaction on July 31, 2009 22:34:
Widget cannot be loaded asynchronously due to document.writeFeedback Widget uses document.write(), which causes the page to be erased when the script is loaded asynchronously. It's important to load scripts asynchronously to improve site performance and therefore user experience.
This is especially applicable to the Get Satisfaction Feedback Widget. The widget is an ideal candidate for asynchronous loading because it is not a dependency for other page elements.
There are a number of DOM functions that allow appending. These should be used instead of document.write().
Example:
asyncLoadJS("http://s3.amazonaws.com/getsatisfaction.com/javascripts/feedback-v2.js", function() {
var feedback_widget_options = {};
feedback_widget_options.display = "overlay";
feedback_widget_options.company = "xxx";
var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);
});
References:
http://stevesouders.com/tests/delayed...
http://pcheese.net/writings/postonloa...
http://www.stefanoforenza.com/documen...
http://stackoverflow.com/questions/76...-
Joachim De Lombaert started following the problem "Twitter in Safari doesn't remember me!" in Twitter.
Loading Profile...
