Issue 1034 in modpagespeed: After Ajax callback, the data resived has added the tag <head />

1 view
Skip to first unread message

modpag...@googlecode.com

unread,
Dec 12, 2014, 9:54:41 AM12/12/14
to mod-pagesp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1034 by marcov...@gmail.com: After Ajax callback, the data
resived has added the tag <head />
https://code.google.com/p/modpagespeed/issues/detail?id=1034

What steps will reproduce the problem?
1. I'm trying to add a new row on a table via Ajax, but can´t understand
why on the response i'm resiving this :

<head/>
<tr id="row_2">
<td class="resized last">
<div class="row-tools">.......

and i only expect the same response without the <head/>.

I just updateded the version of my mod_pagespeed from 1.2.24.1-2581 to
1.8.31.5, with the new version this doesn't work.

I'm working with apache 2.2




--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

modpag...@googlecode.com

unread,
Dec 30, 2014, 5:38:15 AM12/30/14
to mod-pagesp...@googlegroups.com

Comment #1 on issue 1034 by rwap.services: After Ajax callback, the data
I wonder if this is linked to issue 983 ?

modpag...@googlecode.com

unread,
Dec 30, 2014, 11:23:39 AM12/30/14
to mod-pagesp...@googlegroups.com

Comment #2 on issue 1034 by jmaes...@google.com: After Ajax callback, the
data resived has added the tag <head />
https://code.google.com/p/modpagespeed/issues/detail?id=1034

I assume you're serving the AJAX data with an HTML or XHTML content type.

It looks like the add_head filter is enabled for the AJAX data you're
fetching. add_head is turned on by a number of other pagespeed filters
that assume they're working with a fully-formed html page rather than a
fragment of page content (which is what I suspect your AJAX fetch looks
like on the server side).

The simplest expedient is to turn off pagespeed for content you are
fetching using AJAX.
More complicated is to selectively enable a small subset of pagespeed
filters for this content (for example, you might permit image rewriting if
the content contains embedded <img> tags). But in general you're going to
want to avoid any filter that moves content around on the page or injects
JavaScript.

modpag...@googlecode.com

unread,
Apr 8, 2015, 2:09:25 PM4/8/15
to mod-pagesp...@googlegroups.com

Comment #3 on issue 1034 by jcro...@google.com: After Ajax callback, the
data resived has added the tag <head />
https://code.google.com/p/modpagespeed/issues/detail?id=1034

this issue has been migrated to github:
https://github.com/pagespeed/mod_pagespeed/issues/1034
Reply all
Reply to author
Forward
0 new messages