ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - Difference? Response.AddHeader vs CacheControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Difference? Response.AddHeader vs CacheControl

 Post Reply Post Reply
Author
Message
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Topic: Difference? Response.AddHeader vs CacheControl
    Posted: 28-February-2014 at 11:57pm
I'm trying to optimize our pages so they'll load faster. Chrome's "Audit" thing wants me to enable caching. I was able to do so one one page by changing:


Response.CacheControl = "no-cache"
...to...

Response.CacheControl = "private"

However, just about every file in ProductCart has these lines at the top:

<% response.Buffer=true
Response.Expires = -1
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>

It seems like AddHeader "cache-control" and CacheControl "no-cache" are redundant. Is there any reason for them both being here? Do they do something different? If I want to enable caching, which one should I change / remove?

Most importantly, will it screw anything up if I enable caching? Worst case scenario I can think of is we remove a product from the storefront or change the price, and a customer sees the old info.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.094 seconds.