Disabling ?Modpagespeed=noscript when no javascript is enabled

2,320 views
Skip to first unread message

Hugues Alary

unread,
Sep 24, 2013, 2:24:02 PM9/24/13
to mod-pagesp...@googlegroups.com
Hi there, 

Sorry if this question has already been answered, but I can't find the answer.

mod_pagespeed adds a <noscript> tag that contains a meta-refresh redirecting to the url of the page with a ?Modpagespeed=noscript parameter when the browser requesting the page doesn't have javascript enabled.

I understand why this is happening, and it makes sense, but in my case, I need to disable this feature and it doesn't seem like there's an option to disable this behavior.

tl;dr:
Is there any way I could prevent mod_pagespeed from inserting this <noscript> tag in my pages?

I'm using mod_pagespeed on apache, if that matters.

Thanks for your help,
-Hugues

Matt Atterbury

unread,
Sep 24, 2013, 2:27:51 PM9/24/13
to mod-pagespeed-discuss
IIRC this is only inserted if you use a filter that injects JS into the page, since if the browser has JS disabled that obviously won't work.

What filters are you using, and can you disable those that use JS?


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAL_utwaAjYEMK1ft%3DSFH74Vxm3ZE%3Dbg8vhSnZTE3FW2KSe3TYg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
"Klaatu barada nikto"                          (754) 444-6288

Hugues Alary

unread,
Sep 24, 2013, 2:39:04 PM9/24/13
to mod-pagesp...@googlegroups.com
Hi Matt,

I do indeed use JS filters that inject javascript in the page, and I need them.

However, although the page will fail if the client doesn't have Javascript enabled, I don't care, because it already fails even without mod_pagespeed.

Let's take another case where this automatic injection of <noscript> tags is problematic: what if I already have <noscript> tags in my page that redirect to a non-javascript friendly version of my website? I'm pretty sure (thought haven't tested) that this will conflict with mod_pagespeed own <noscript> tags. Either my tag will be taken into account by the browser, either mod_pagespeed tags, but in any case this is an inconsistent behavior.

So basically, disabling JS filters is not a solution for me, and I feel like it would make more sense to have the possibility to disable injection of <noscript> tags (if this isn't already the case, but I haven't found how).

-Hugues



Matt Atterbury

unread,
Sep 24, 2013, 3:48:08 PM9/24/13
to mod-pagespeed-discuss
Adding this to your pagespeed.conf should disable the adding of the =noscript redirection:
ModPagespeedSupportNoScriptEnabled false

m.



For more options, visit https://groups.google.com/groups/opt_out.

Hugues Alary

unread,
Sep 24, 2013, 3:54:50 PM9/24/13
to mod-pagesp...@googlegroups.com
Worked like a charm! Thanks Matt!


Matt Atterbury

unread,
Sep 24, 2013, 4:10:58 PM9/24/13
to mod-pagespeed-discuss
No problems!
And if I may ask, why do you strip out the X-Mod-Pagespeed header in your responses?
It's perfectly fine to do so, we're just curious about why :-)



For more options, visit https://groups.google.com/groups/opt_out.

Hugues Alary

unread,
Sep 24, 2013, 5:08:21 PM9/24/13
to mod-pagesp...@googlegroups.com
There's no real reason other than filtering out headers we consider debug headers. 





John

unread,
Sep 25, 2013, 9:23:28 AM9/25/13
to mod-pagesp...@googlegroups.com
On a sort of related note. When I had dedupe inlined images turned on it obviously added the no script. I disabled it because the SAS app that our business folk use for SEO analysis started picking up on the noscript links and tanked the scoring because '?Modpagespeed=noscript' has a capital 'M', and apparently it doesn't like capitals in the path name...

I don't know if you all care, I honestly don't put too much stock into the analysis, but I figured I would at least throw it out there.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.



--
"Klaatu barada nikto"                          (754) 444-6288

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.



--
"Klaatu barada nikto"                          (754) 444-6288

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.



--
"Klaatu barada nikto"                          (754) 444-6288

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Hugues Alary

unread,
Sep 25, 2013, 1:17:09 PM9/25/13
to mod-pagesp...@googlegroups.com
This is actually how I discovered this problem. Our SEO tool was reporting duplicate content, and this is why I wanted to disable it.


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/fe393397-313a-4830-bac0-5b84116f6c10%40googlegroups.com.

Mickael Boudni

unread,
Jan 14, 2014, 2:00:42 AM1/14/14
to mod-pagesp...@googlegroups.com
Hi!

Thanks Matterbury for the tips!
As SEO matters were raised along this Modpagespeed=noscript concern, I just wanted to point out that the need of rel=canonical throughout our websites might be reinforced in this case. Indeed, I've just got URLs with "?Modpagespeed=noscript" indexed by Google, as well as the original URL of course... In order to give search engines hints to avoid duplicate content, I'll start ensuring that rel=canonical is systematically implemented (and correctly!).


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.



--
"Klaatu barada nikto"                          (754) 444-6288

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.



--
"Klaatu barada nikto"                          (754) 444-6288

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.



--
"Klaatu barada nikto"                          (754) 444-6288

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages