Home Forums Bug Reports Plugin is not compatible with Google PageSpeed Module


Plugin is not compatible with Google PageSpeed Module

  • We have Google PageSpeed installed in our server. By default, PageSpeed removes anything that can be removed from the HTML to reduce its filesize.

    One of the stuff that gets removed is type='text' from input fields.

    This is causing issues with the plugin, as it relies on the type='text' attribute when creating some certain advanced fields (ex: The date picker fields).

    If possible, when searching through the inputs, you could consider the inputs without any type atttibrute the same as inputs with type='text'.
    For instance:

    $('input[type="text"], input:not([type])')

  • Hi @dan

    I can’t remove the type=text attribute from inputs as it will cause major CSS issues with browser support.

    Sorry, but I am unable to help you with this one. Perhaps you could edit the google plugin to leave the type=text attributes in? These are used by many JS / CSS files from both WP and ACF

  • Oh no, I’m not saying you should remove the attribute at all.

    But maybe you misunderstood my problem. I am using the pagespeed server edition (I wasn’t talking about the one that is installed on top of Firebug or on Google Chrome). It’s a module that when installed on the server on top of apache or nginx, it will minify the final HTML, JavaScript and CSS code in order to optimize it.

    One of pagespeed’s optimization features, is to remove the type='text' from inputs, since according to the HTML5 w3 standard

    The missing value [of the input’s type] default is the Text state.

    My request is just to add input:not([type]) to the jQuery selectors. So when the type is missing, it would be considered as if <input type='text' />.

    If you’re still not sure what I’m talking about, you can view the PageSpeed module here:

  • Hi @dan

    thanks for the clarification


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Plugin is not compatible with Google PageSpeed Module’ is closed to new replies.