SHARE
TWEET

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

a guest Feb 28th, 2012 15 Never
  1. $.ajaxSetup({
  2.     'beforeSend' : function(xhr) {
  3.         xhr.overrideMimeType('text/html; charset=UTF-8');
  4.     },
  5. });
  6. $('#stuff').load('/yourresource.file'); // your ajax load
RAW Paste Data
Top