PageSpeed Apache - Disable Cache

655 views
Skip to first unread message

Vishnuvardhan Krishnan

unread,
Nov 14, 2015, 12:50:37 PM11/14/15
to mod-pagespeed-discuss
Hi All.

I am using PageSpeed module on Apache with Adobe AEM CMS as front end.

In one of the site that we use, we disabled webserver (apache) cache for some of the pages of the website for certain to work correctly. But, since PageSpeed is caching these pages as well, the functionality is broken.

Can you please let us know how to disable cache (not disabling rewritten but caching itself) for these pages?

URL - www.example/x/y.html

Thanks in advance,
Vishnu

Joshua Marantz

unread,
Nov 14, 2015, 7:55:49 PM11/14/15
to mod-pagespeed-discuss
What specifically is being cached that you don't want, or that breaks the site.

The mod_pagespeed external resource optimization system depends on having a cache, even if it's a small one.  So without caching we can rewrite only HTML and inline CSS/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/99dd1e65-4987-45ff-bf07-5a021c209d29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vishnuvardhan Krishnan

unread,
Nov 16, 2015, 6:39:36 AM11/16/15
to mod-pagespeed-discuss
Hi,

I need few html pages to be not cached since these pages are dynamic...

Please let me know...

Thanks.

Vishnuvardhan Krishnan

unread,
Nov 16, 2015, 6:48:29 AM11/16/15
to mod-pagespeed-discuss
To be more specific, I need these few html pages to be not processed by mod_pagespeed....

Thank you.

Jeff Kaufman

unread,
Nov 16, 2015, 9:59:42 AM11/16/15
to mod-pagespeed-discuss
The normal way this works is that you have a dynamic html page like
/users/me/profile.html that is generated on a per-user basis. The
resources this page refers to, though, are not dynamic, and are things
like /images/users/jefftk.jpg or /images/users/keyveevee2005.jpg. Is
this your setup?

In that case, PageSpeed shouldn't be causing any problems. It assumes
all HTML is uncacheable even if the headers allow caching, and for
other resources it caches them if the headers allow that.

Can you explain more how PageSpeed is breaking www.example/x/y.html ?
> --
> 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/792e7a7b-9c8e-4b55-a210-6c74cb7d29d2%40googlegroups.com.

Joshua Marantz

unread,
Nov 16, 2015, 10:01:02 AM11/16/15
to mod-pagespeed-discuss
Use
  ModPageSpeedDisallow url_wildcard_pattern

e.g. to remove pages under http://example.com/admin use:
  ModPagespeedDisallow http://example.com/admin/*

And just to be clear, mod_pagespeed is *not* caching HTML at all.  So if you have a caching problem of some kind you won't fix it with this Disallow command.  However if MPS is breaking your page in some other way, then this will work around it, but we'd like to know more detail about what's breaking.

-Josh

On Mon, Nov 16, 2015 at 3:48 AM, Vishnuvardhan Krishnan <keyvee...@gmail.com> wrote:
To be more specific, I need these few html pages to be not processed by mod_pagespeed....

Thank you.
--
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.

Vishnuvardhan Krishnan

unread,
Nov 16, 2015, 10:12:24 AM11/16/15
to mod-pagespeed-discuss
Hi,

Thank you for your reply...
My html page has some quiz functionality which generates score based on answer.
This score directly comes from code & not from any other resource.

Due to MPS this score displays blank intermittently. We can see these pages are getting cached at MPS. So we need to disable caching for these pages.

Thanks in advance.

Joshua Marantz

unread,
Nov 16, 2015, 10:17:45 AM11/16/15
to mod-pagespeed-discuss
That should work fine.  No caching will get in the way of the quiz code.  You can just disable MPS for that page if you want, but I'd be curious what is specifically breaking.  Did you write the quiz JS code?  Did you debug it with MPS enabled?  Is there anything in the console?

-Josh


--
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.

Vishnuvardhan Krishnan

unread,
Nov 16, 2015, 10:23:55 AM11/16/15
to mod-pagespeed-discuss
I will check with ModPageSpeedDisallow option and let you know.
Reply all
Reply to author
Forward
0 new messages