Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Browser not fetching new HTML tag

Discussion in 'Misc WordPress Requests' started by davecan, Jan 10, 2018.

  1. davecan

    Guest

    Browser not fetching new HTML tag, by davecan

    We added a plugin that has a field to add the required script tag which gets put into the HTML head tag, but we found only showed up on the home page, but the next day showed up on all the pages as designed. We checked the plugin’s source code and see nothing amiss there, and it worked fine for me on local and stage (though my browser’s caching has been more predictable).

    Since nothing was changed during that period, we think the browser was just using cached HTML and not fetching the new tag…

    I know we can add a random number or unix timestamp to the end of the file name in the tag, but I thought that only refreshes the fetched code (because it’s fetching an updated file), and wouldn’t even be visible to a browser that isn’t aware there’s a new tag anyways because it’s only using cached content…

    Do you see what I mean? If the browser scans through the cached HTML tags, it can’t check that a tag not even in the cache has a different number at the end because it doesn’t know it exists and it doesn’t check for a new tag there…

    Is there some WordPress-y or other solution to make sure newly-added tags get fetched by the browser? Does adding a random number to the end of the filename somehow make the browser check for a tag that doesn’t exist in the cache?

    Browser not fetching new HTML tag
     
    #1

Share This Page

Monarch Social Sharing Plugin