Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

jQuery $.get() charset of reply when no header is set

By: a guest on Feb 28th, 2012  |  syntax: None  |  size: 0.18 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $.ajaxSetup({
  2.     'beforeSend' : function(xhr) {
  3.         xhr.overrideMimeType('text/html; charset=UTF-8');
  4.     },
  5. });
  6. $('#stuff').load('/yourresource.file'); // your ajax load