[wp-trac] [WordPress Trac] #11487: Fix AJAX bug created by web hosts who inject ads into html pages
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 18 19:31:24 UTC 2009
#11487: Fix AJAX bug created by web hosts who inject ads into html pages
--------------------------+-------------------------------------------------
Reporter: palotasb | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version:
Severity: normal | Keywords: free web hosting, ads, admin
--------------------------+-------------------------------------------------
Most web hosting companies insert ads into HTML pages downloaded from
them. This breaks some admin page features, because files downloaded via
AJAX have a text/html header and the host automatically injects the ads.
This sometimes creates a reload cycle or makes the page completely
unaccessible.
I have fixed the issue partly by editing /wp-admin/admin-ajax.php at line
19 and /wp-admin/index-extra.php at line 18, by overwriting the Content-
Type header to be text/plain. This does not fix the issue on the admin
dashboard, where some widgets need to be disabled.
I suggest that any content not rendered directly by the browser (used for
AJAX data transfer only, processed by JavaScript, where only content
matters) should be transferred using a text/plain header. This should be a
straightforward change and I don't think it could cause any bugs
(actually, it works for me), but you may want to investigate.
In case you want to reproduce, you have to set up a web server in a way
that it injects some content into the body of every served file with the
text/html MIME type.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11487>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list