Community Forums 

Main Content

Browser caching issues

    Sep 19 2017 17:34:13

    #1

    Gil Sery

    Join date : 2010-04-27      Posts : 141

    Whenever I change the prices on my website, my repeat customers come to my site, and because my site is cached in their browser, they see the old prices and use the old prices to order my products. Is there a way for the instructions sent to your customerís browser from the shopping cart to compare cached pages to the current pages, and load the new pages if necessary?



    Sep 19 2017 18:29:54

    #2

    GT

    Join date : 2008-09-18      Posts : 3202

    Add these two lines into the head area of every page...

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Sep 19 2017 21:33:50

    #3

    Gil Sery

    Join date : 2010-04-27      Posts : 141

    Thanks, GT. I tried that, but it didn't do anything.

    Here's the <head> tag from my page:

    ?><!DOCTYPE html>
    <html class="<?php echo esc_attr($html_class); ?>" <?php language_attributes(); ?> xmlns="http://www.w3.org/1999/xhtml">;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    <?php if (wp_is_mobile()): ?>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <?php else: ?>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php endif; ?>
    <link rel="profile" href="http://gmpg.org/xfn/11">;
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php wp_head(); ?>
    </head>

    Is there something wrong that I missed or messed up?

    When I make a change, that change isn't immediately reflected upon visiting the site a second (or subsequent) time. The visitor has to hit Refresh in order to see the new change reflected in the page. The problem is that my visitors don't know that they need to do that, so they keep ordering at the old prices.



    Sep 20 2017 07:00:46

    #4

    GT

    Join date : 2008-09-18      Posts : 3202

    What is the ?> at the start of line one?

    ?><!DOCTYPE html>

    Show us a page with the modification on.

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Sep 20 2017 16:25:35

    #5

    Gil Sery

    Join date : 2010-04-27      Posts : 141

    GT said What is the ?> at the start of line one?

    ?><!DOCTYPE html>

    > Show us a page with the modification on.


    I'm not sure what that question mark is. I assumed it had something to do with the fact that there is also PHP on the same page.

    Here's a sample URL:
    http://www.tungstenheavypowder.com/shopping/tungsten-bucking-bars/



    Sep 21 2017 07:49:34

    #6

    GT

    Join date : 2008-09-18      Posts : 3202

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.