Problem with the browser cache

8 posts by 5 authors in: Forums > CMS Builder
Last Post: November 11, 2010   (RSS)

By Djulia - February 18, 2008

Hi,

I have sometimes a problem with the editor and the cache of my browser.
The pages are sometimes preserved.

I would like to force the browser as follows :

<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header('Content-Type: text/javascript');
?>

You think that it is a good solution ?

Thank you for your feedback.

Djulia

Re: [Djulia] Problem with the browser cache

By Dave - February 18, 2008

It's worth a try. It could be something to do with the setup of your web browser, or web server as well. I've seen some web servers that send extra caching headers unnecessarily.

But adding that header first is a good first start. You'll want to add that to the very top of /lib/menus/header.php.

Also don't include the "text/javascript" line since that content isn't javascript.

Let me know if that works.
Dave Edis - Senior Developer
interactivetools.com

Re: [sublmnl] Problem with the browser cache

By Jason - November 5, 2010

Hi,

It shouldn't be a caching issue if you've tried it in multiple browsers. Are the drop down options just a list, or are they being brought in from a different table?

If you're still experiencing this issues, please fill out a 2nd Level Support Request here:
https://www.interactivetools.com/support/email_support_form.php
and we can take a closer look at this for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Problem with the browser cache

By sublmnl - November 7, 2010 - edited: November 7, 2010

Its the same editor same table, and here is the code for the search in the head:

// load records
list($all_find_a_retailerRecords, $all_find_a_retailerMetaData) = getRecords(array(
'tableName' => 'find_a_retailer',
'allowSearch' => false,
'loadUploads' => '0',
'orderBy' => 'state',
));

list($find_a_retailerRecords,) = getRecords(array(
'tableName' => 'find_a_retailer',
'requireSearchMatch' => true,
));


and the body:

<form method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>" id="retailer_search" >
<select name="state">
<option value="">Select A State</option>
<?php $lastState = null; ?>
<?php foreach($all_find_a_retailerRecords as $record): ?>
<?php if ($lastState == $record['state']) { continue; } else { $lastState = $record['state']; } ?>
<option><?php echo htmlspecialchars($record['state']) ?></option>
<?php endforeach ?>
</select>


<input type="submit" name="submit" value="Search">
</form>

below all this is the regular old "ForEach" code for the results.
I changed the spelling for a State abbreviation in the Editor and it did not reflect the change on the site drop down for the search.
Weird.
I ended up deleting the states field from the editor and added it back in as a new entry. Which sucks because I had to go back and literally check off each state for all locations.
[:/] [:(]

Re: [sublmnl] Problem with the browser cache

By Jason - November 8, 2010

Hi,

Sorry you're running into so much trouble. Are you still experiencing a problem, or has it been fixed now?

If you're still having an issue, please fill out a 2nd level support request and I can take a closer look into this.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Problem with the browser cache

By sublmnl - November 10, 2010

Yeah still had the issue as of earlier but since then I deleted the field in the editor and recreated it but as I was saying earlier.... had to essentially re-map all the retailers (missing a state = no results in search to put them in)

Re: [sublmnl] Problem with the browser cache

By Chris - November 11, 2010

Hi sublmnl,

When you change the options for a List Field set to "Use options listed below", the records aren't updated and will still contain old values. One quick way to update those records is with an SQL statement which you could punch in via the free MySQL Console Add-on. If you run into this problem again, we can help you construct an SQL statment to fix up your records.

If you need to change your list options frequently, it's best to use the "Get options from database (advanced)" feature (with "num" set to the option values field), which will preserve relationships between records should you need to rename any of the options.

I hope this helps! Please let me know if you have any questions.
All the best,
Chris