Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-04-25 20:01:35

Phil_
Member
Registered: 2009-09-21
Posts: 37

Database not updating - browser cache issue?

Textpattern version: 4.8.8

Since I moved my site to a new VPS I’ve started having problems with articles, forms and pages etc not writing to the database when I edit them. I’ve had the red band at bottom of screen saying someone else is editing (or words to that effect) and telling me to click the button again to save. Mostly I get the green saved notice first time.

I then go on to do something else, realise I want to tweak what I was working on, go back to it and I’m seeing the version before the last time I saved it.

I anyone else has had this issue and found a solution I’d really like to find out what it is. I’m starting to find it frustrating. I have two Textpattern installs in different directories of the same domain and they both have the issue.

Could this be being caused by the interaction between my mod_expires directives in Apache2 and my browser cache?

What is the recommended caching set up?

I have several other websites using earlier versions of Textpattern and don’t have a problem on those.

Any help would be much appreciated.

Offline

#2 2023-04-26 08:10:36

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: Database not updating - browser cache issue?

I don’t have an immediate answer or ideas to solve, but please post your High diagnostics here as a reply and we can take a look.

Offline

#3 2023-04-26 10:56:01

Phil_
Member
Registered: 2009-09-21
Posts: 37

Re: Database not updating - browser cache issue?

Thanks for taking an interest. I’ve anonymised the domain.

Textpattern version: 4.8.8 (a5969b336c096d872a7ecab9ee25914b)
Last update: 2023-03-29 15:20:57
Site URL: www.mydomain.co.uk/topic
Admin URL: www.mydomain.co.uk/topic/textpattern
Document root: /var/www/mydomain.co.uk
$path_to_site: /var/www/mydomain.co.uk/topic
Textpattern path: /var/www/mydomain.co.uk/topic/textpattern
Article URL pattern: title_only
Production status: live
Temporary directory path: /tmp
PHP version: 7.4.33
GD Graphics Library: 2.3.0; Supported formats: GIF, JPEG, PNG, WebP.
Intl extension: Unavailable
Multibyte String extension: 7.4.33
Server time zone: UTC
Server local time: 2023-04-26 10:53:29
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 0
Time zone (GMT offset in seconds): UTC (+3600)
MySQL: 5.5.5-10.9.5-MariaDB-1:10.9.5+maria~deb11 (mariadb.org binary distribution)
Database server time: 2023-04-26 10:53:29
Database server time offset: 0 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: en_US.UTF-8
Site / Admin language: en / en
Web server: Apache/2.4.56 (Debian)
PHP server API: fpm-fcgi
PHP SSL version: OpenSSL 1.1.1n 15 Mar 2022
RFC 2616 headers: 0
Server OS: Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) ×86_64
Admin-side theme: hive 4.8.8
Active plugins: rdt_dynamenus-0.9 soo_toc-0.1.5

.htaccess file contents: ————————————
  1. BEGIN Textpattern
    #DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L] RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}] </IfModule>

#php_value register_globals 0

<IfModule mod_mime.c> AddType image/svg+xml svg svgz AddEncoding gzip svgz </IfModule>
  1. END Textpattern

————————————

Charset (default/config): utf8mb4/utf8mb4
character_set_client: utf8mb4
character_set_connection: utf8mb4
character_set_database: utf8mb4
character_set_filesystem: binary
character_set_results: utf8mb4
character_set_server: utf8mb4
character_set_system: utf8mb3
character_sets_dir: /usr/share/mysql/charsets/
collation_connection: utf8mb4_general_ci
collation_database: utf8mb4_general_ci
collation_server: utf8mb4_general_ci
18 database tables: OK

10 custom fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)

Pretext data: array ( ‘request_uri’ => ‘/topic/8d6a3267f28f4f16809c7bf2815f65a3/?txpcleantest=1’, ‘qs’ => ‘txpcleantest=1’, ‘subpath’ => ‘\\/topic\\/’, ‘req’ => ‘/8d6a3267f28f4f16809c7bf2815f65a3/?txpcleantest=1’, 0 => 2, 1 => ‘8d6a3267f28f4f16809c7bf2815f65a3’, 2 => ‘’, ‘secondpass’ => 0, ‘_txp_atts’ => false, ‘status’ => ‘200’, ‘id’ => ‘’, ‘s’ => ‘’, ‘c’ => ‘’, ‘context’ => ‘’, ‘q’ => ‘’, ‘m’ => ‘’, ‘pg’ => ‘’, ‘p’ => ‘’, ‘month’ => ‘’,

/vendors/PrismJS/prism/prism.js: 73619f78b4029f2a422df922d28851ed
/vendors/Textpattern/Loader.php: a195a12516a96edc25781c0d62386f98
/vendors/Textpattern/Skin/AssetBase.php: d7e6675f45047dfae023d0d288dd07e9
/vendors/Textpattern/Skin/FormInterface.php: 6ab4c480327053ac6dce4af79645f7ee
/vendors/Textpattern/Skin/PageInterface.php: 83c4e72243616403c9f112ff1a0148a8
/vendors/Textpattern/Skin/CommonBase.php: 39d177eb701ce5d5fed8ee470bab6987
/vendors/Textpattern/Skin/AssetInterface.php: a28dbec7bb143d09e8403a51219b11c9
/vendors/Textpattern/Skin/CssInterface.php: f3e6fbf2c3cd01a6d962fcd85d2f4b0f
/vendors/Textpattern/Skin/Skin.php: ce10cedf91b7e793fba1a5e56293aef8
/vendors/Textpattern/Skin/CommonInterface.php: 99815591ef8f5934e8228946e486f867
/vendors/Textpattern/Skin/Page.php: 4ca1bf0ec3d0b4a9b681f5d2fcf8f270
/vendors/Textpattern/Skin/Form.php: ce936511bf1827207cde88f3f544855f
/vendors/Textpattern/Skin/Css.php: 8e37f4c1adf1550b9f3dc993145fa141
/vendors/Textpattern/Skin/SkinInterface.php: b5fba033bf147fbf5222db153aa96ca6
/vendors/Textpattern/L10n/Lang.php: 2c3bba6945ffc0c9059564a1993173d5
/vendors/Textpattern/L10n/Locale.php: fb312a491baaf90c8a3b120e9a553afd
/vendors/Textpattern/Password/Hash.php: 85c20ae0fc6b331407a995e79d70ccb4
/vendors/Textpattern/Password/Adapter/PasswordHash.php: f1795d8aacbc866a5a1161d9567f110c
/vendors/Textpattern/Password/AdapterInterface.php: d14e8e378034af4c05be7567ec3c154d
/vendors/Textpattern/Password/Random.php: c24ec319f8e6776ba75aaea71900dcd9
/vendors/Textpattern/Password/Generator.php: 5661429fe8ae116da739e41357dc8a55
/vendors/Textpattern/Validator/Validator.php: 7da93a1fefb644cd33a9d6d49042d22b
/vendors/Textpattern/Validator/CategoryConstraint.php: a8ae83f39f9be4b1d11f97c9878696fc
/vendors/Textpattern/Validator/BlankConstraint.php: 8656f714303ec2c7bd4b8ae288af7e43
/vendors/Textpattern/Validator/SectionConstraint.php: c66acbe2d647ae1470bc7d13ccc6c4f1
/vendors/Textpattern/Validator/FalseConstraint.php: f537eb1e4c26413b181aab077dfcd05f
/vendors/Textpattern/Validator/Constraint.php: f3bb3186008b132a72c0c6a8d874fa77
/vendors/Textpattern/Validator/ChoiceConstraint.php: 82b912c9117274643b451700eb1f281e
/vendors/Textpattern/Validator/TrueConstraint.php: 3f64495c362904ee51e3592ee0b8e2e9
/vendors/Textpattern/Validator/FormConstraint.php: acb5db98488f6a8c4555d401bf0e1901
/vendors/Textpattern/Textile/Parser.php: 3080c298098542f4ea4d34f62f7f7dee
/vendors/Textpattern/Textile/RestrictedParser.php: ebd466fd976557ed4b88bc1f35059646
/vendors/Textpattern/Security/Filter.php: ff1f269fdfae60dae0ffc2b3beea17e4
/vendors/Textpattern/Security/Exception.php: 0202787ab9eb47d973d87ca43a4dcd99
/vendors/Textpattern/Mail/Encode.php: 86385287ef187c52aa5e0376dde3e11c
/vendors/Textpattern/Mail/Compose.php: 39ab07930843d9706e8e16b737864e4e
/vendors/Textpattern/Mail/Adapter/Mail.php: f5b075d41055a81b3c664945f5a0d3f0
/vendors/Textpattern/Mail/AdapterInterface.php: c8883622440c068791faa61484cee3e5
/vendors/Textpattern/Mail/Exception.php: fa90a487622e4b6ebbc033ae43b96f7e
/vendors/Textpattern/Mail/Message.php: 0bd3107e75d2b391ba6a934215332f90
/vendors/Textpattern/Module/Help/HelpAdmin.php: 190cc5da805abb7b29aca1f54a145df2
/vendors/Textpattern/Date/Timezone.php: f964f2a32d8247e47ee2def89ca51007
/vendors/Textpattern/Textfilter/Registry.php: bdb965fd66d1ce36fb2dcdca88699a1b
/vendors/Textpattern/Textfilter/Plain.php: d6629f370a644ade350297657fe453d0
/vendors/Textpattern/Textfilter/Constraint.php: 3314f6be9bd9a5810a99451afa64db49
/vendors/Textpattern/Textfilter/Base.php: 0ba2337b1287b0ecbd4988f66ae269b0
/vendors/Textpattern/Textfilter/Nl2Br.php: 9c178605a1990c944c6535d5dc294fce
/vendors/Textpattern/Textfilter/Textile.php: 629fda14911980f4ad8e684425ef1552
/vendors/Textpattern/Textfilter/TextfilterInterface.php: e23f4dd15449089e801a86ec7f5aca3b
/vendors/Textpattern/Plugin/Plugin.php: 23a84f0c322c5d2f21abe5255b070dd1
/vendors/Textpattern/Admin/Paginator.php: 3129b8fb7d79b49c29a5dbbcccca993e
/vendors/Textpattern/Admin/Theme.php: 62b9a504e8c74ebe13ddb3fe9af333e8
/vendors/Textpattern/Admin/Tools.php: 86c930fe6fad35d243e9d575e98c82d7
/vendors/Textpattern/Admin/Table.php: 4a9025553b497d896bbb994a8dcde473
/vendors/Textpattern/Server/Files.php: d1e89dc2be59a9eae47f808a7f5273ee
/vendors/Textpattern/Server/Config.php: 9bd5ca6f110698fb0779ff03853d8501
/vendors/Textpattern/Search/Method.php: f434ca72b4d66c5ea92f4e9f9636c639
/vendors/Textpattern/Search/Filter.php: 04c8e19ff4155042cb00d132a60a957b
/vendors/Textpattern/Container/Container.php: f2bb5945653e0d3d2bc508215e728a24
/vendors/Textpattern/Container/FactorableInterface.php: fd68d479b92b481fa766938fca584b8a
/vendors/Textpattern/Container/ReusableInterface.php: 598960cc0fc6e25abc7356428ae1348b
/vendors/Textpattern/Container/FactoryInterface.php: d7f60ec9edc84c0345f3339b8f072ea4
/vendors/Textpattern/Container/ContainerInterface.php: b5131edf5ca48de3bc3e9c5016407fae
/vendors/Textpattern/Iterator/FileIterator.php: 984f6d78938126a62934bb68ac604750
/vendors/Textpattern/Iterator/RecIteratorIterator.php: 3140e96fddacfe8738c824f1583e45e8
/vendors/Textpattern/Iterator/RecFilterIterator.php: 39133201babe3f528400f4900cb34d7d
/vendors/Textpattern/Iterator/RecDirIterator.php: 84eb83453bf43259b03bbfe959e6069d
/vendors/Textpattern/Adaptable/ProvidableInterface.php: 96150e173c8e7ad83939c4dd2add4cc0
/vendors/Textpattern/Adaptable/AdapterInterface.php: 7dc1628be9d312ec253fd73c943815c6
/vendors/Textpattern/Adaptable/Providable.php: b100509a81c2c3964f4e265556089c66
/vendors/Textpattern/Type/TypeCallable.php: 54e7db0576b827be0c470c1e56c17db0
/vendors/Textpattern/Type/TypeInterface.php: 332e329eb70265eaf8b178dae85871b6
/vendors/Textpattern/Type/StringType.php: 7ceadf505a4e876097d8d1054c87776d
/vendors/Textpattern/Http/Request.php: 7cb475dcfdd6417ee104cc320f32e003
/vendors/Textpattern/DB/Core.php: dd7bc04910031306f14e538a53e397fc
/vendors/Textpattern/Textpack/Parser.php: 98dba61dc39fc90f19f024246f4b1d6c
/vendors/Textpattern/Textpack/StringInterface.php: 91ff35665089fe78f5094936d031ff6b
/vendors/Textpattern/Textpack/String/Iterator.php: 9d669f8bea1e3ec5b37fd9b42c0f230f
/vendors/Textpattern/Filter/FilterCallable.php: aaf62d55c1992dd1ff98dcd9808d02d9
/vendors/Textpattern/Filter/StringFilter.php: 199ec4ba9b3050de375ae89665276efd
/vendors/Textpattern/Filter/Exception.php: e6dca6315b0c796e4c04c99704942064
/vendors/Textpattern/Import/TxpXML.php: b8e11ac498ffa53b45885fd08bb18a24
/vendors/Textpattern/Tag/Registry.php: 52526b64f1969bc1a5b0ba8f4d9fde48
/vendors/Textpattern/Tag/Syntax/Link.php: 7e1de226ba840b8d827486b09a114014
/vendors/Textpattern/Tag/Syntax/File.php: 14bb3856b69d50e30dd237c6e0e11056
/vendors/Textpattern/Tag/Syntax/Partial.php: 46306a4cd47cb9ed86273318a041147c
/vendors/Textpattern/Tag/Syntax/Authors.php: 1306c7b0c88135fcb0217443ceaaf136
/vendors/Textpattern/Tag/Syntax/Image.php: 047939fbc0070fb37c3fc011139b7c68
/vendors/Txp.php: c2d65c18a1ef91790486af430a6bca03
/vendors/jquery/jquery/jquery.js: dc5e7f18c8d36ac1d3d4753a87c98d0a
/vendors/jquery/jquery-ui/jquery-ui.js: c15b1008dec3c8967ea657a7bb4baaec
/vendors/Netcarver/Textile/Parser.php: 0cf4fd540211bedef0af515e813e9d86
/vendors/Netcarver/Textile/DataBag.php: 67ab988e7ab1d072937acbbcb023a288
/vendors/Netcarver/Textile/Tag.php: 73f14c01329e27998a213b7e5b79e620
/vendors/blueimp/fileupload/jquery.fileupload.js: ad343074e49b49965450a3134e9d5068
/index.php: 33865c828d60c67d1597c6b05536f551
/update/_to_4.7.0.php: 7e7eb8c5123cfe7af44480811df929dd
/update/_update.php: 7b6bc00f5b8848986c9293584a4586bb
/update/_to_4.7.2.php: 85944cf6eed5269d61ba4b18e600d7b3
/update/_to_4.5.0.php: ea39b779a8f432d5b82e14f53786f11a
/update/_to_4.5.7.php: 93278dc9a0241116bdfd74f0cf9d2bc7
/update/_to_4.3.0.php: 31080463e501cbbd5563acf055501790
/update/_to_4.0.5.php: 1676b20430fb9e9d0bb0ce3b8bf1c64e
/update/_to_4.0.4.php: cc0c12ea65166d2a4521049e1ea5166e
/update/_to_4.0.6.php: 2e024f94c8d3c02c08059934f9ddba4a
/update/_to_4.6.0.php: 4c93422405adac164c76a4633e321a08
/update/_to_4.0.7.php: 6cfcb4026ada140e3c15e015ea55e3d3
/update/_to_4.0.3.php: 10935371d29cabd0f2ed709efbfd0b89
/update/_to_4.2.0.php: daafa866f058bc67c15126e090d22be9
/update/_to_4.8.4.php: a298a949ac492ed68e4d36fed2bddddc
/update/_to_4.8.0.php: 3fac278033fb80a7dd7b1cce1b03552c
/update/_to_4.0.8.php: 48e0bf094b559793549dff765d924cc0
/include/txp_lang.php: d55e0295a1c7e36fe375260cae39362d
/include/txp_link.php: 8f1ad2a0ce548b38de13c921d4a66765
/include/txp_log.php: 4b31513a22e83ccaa7545ff5347dd9ea
/include/txp_auth.php: 270a655ba25d035f4f0b64b39add8732
/include/txp_css.php: 86a489840ea164d639f524cd151daa37
/include/txp_admin.php: d2d680630ff15e5aa89458ac748b3cca
/include/txp_prefs.php: 7dbadc29770cfc4e54af3ac7c352ca04
/include/txp_file.php: 727252c819e01ea532c027084f61447e
/include/txp_diag.php: 4ccf91c75dd555305e19f774ec621cd5
/include/txp_section.php: 85f06cb2b24fed5d1d9fff8d5007ef97
/include/txp_image.php: f0c5f4d36d2546ae351bfd7bdb91c5a5
/include/txp_list.php: ce6e7860a51679cdeb349ded2575bf1c
/include/txp_pane.php: 62296776173b428c05dddbdd15922b30
/include/txp_category.php: 1d9bbd44995b83f515532a41ed555265
/include/txp_skin.php: 5bd78e0b6804da7c472e8826d799694a
/include/txp_tag.php: 91fd00aa7384c67e666111fd72de827e
/include/txp_form.php: 2aa42ec6927bad7ee4381c713e698a27
/include/txp_article.php: 8511847ad84b16980cc434b85889897e
/include/txp_page.php: 683e809e6250f9edae82dab825619f9b
/include/txp_plugin.php: 11e497a6a736aa59d972083d8bfa718b
/include/txp_discuss.php: f214b2c6efbbf8ef37c611007ae9be06
/textpattern.js: 6e638cb7c90bd8915733220d74ace894
/publish/rss.php: 591e84a1071486c8a5fede78c8d6ed63
/publish/taghandlers.php: 7596ff471c7cb9227a021ec64a8e3b12
/publish/search.php: bd88d97bacf765b55e776e523358b593
/publish/atom.php: f3ce6ad8b1e008feace8d6a54cce2658
/publish/comment.php: 485392be955c67d4a61a4b6f750b2d34
/publish/log.php: cc08cd95c3ba9c414f5a911ed53d6cfc
/admin-themes/classic/classic.php: e2c215c99765c8d0dedbf2e016a56b77
/admin-themes/hive/hive.php: a778c0f806e072d31210dc72149a19ed
/admin-themes/hive/assets/js/autosize.js: f638fb2a52f1dd07bd6abb479ca0911a
/admin-themes/hive/assets/js/main.js: 20e0abada1da15e4bf16b7a43fa3802d
/admin-themes/hive/assets/js/darkmode.js: 256ec5c3f1b984fcc388949c4410f346
/admin-themes/hiveneutral/hiveneutral.php: 70f34bcb1cf9cb2eb1bddbc2370354eb
/admin-themes/hiveneutral/assets/js/autosize.js: f638fb2a52f1dd07bd6abb479ca0911a
/admin-themes/hiveneutral/assets/js/main.js: 20e0abada1da15e4bf16b7a43fa3802d
/admin-themes/hiveneutral/assets/js/darkmode.js: 256ec5c3f1b984fcc388949c4410f346
/lib/txplib_publish.php: 1cd1d448ceac660ccdeac1aaac7c5170
/lib/txplib_theme.php: 8c452bf3b1d0656cdd15e446f51ef9d0
/lib/txplib_wrapper.php: 38294c273b0baaaef1bc0ed93c942c7f
/lib/IXRClass.php: a1b525b4a9ed12dcb5677d5232a3d92e
/lib/array_column.php: 154ae62342164fe4d727b28813f268b6
/lib/txplib_validator.php: b93651c1c8693296032ed040c2299a98
/lib/txplib_db.php: 7483e91d6aa35ceb1b2df69c7a963b1c
/lib/PasswordHash.php: 66a8aa4b2d6e0527877a797907efc035
/lib/txplib_update.php: 5c826f863f5e4e8ef2bfdef2068352e1
/lib/classTextile.php: f87a8054e245302160fdb3b5b02e06af
/lib/taglib.php: abd39827062aec7206c96c4f784a7f6d
/lib/constants.php: 715a4e6b8157e2323ed4875b875ed293
/lib/txplib_forms.php: 32608e78213ac9c95b355388a2d0ad80
/lib/txplib_head.php: 93ba1ed4652a124ff8ede840155d26bc
/lib/txplib_html.php: 360051335d01a238b7286c9543291c58
/lib/txplib_admin.php: 12527dd85f49ae9e1a5a6a4cbf6d655b
/lib/class.thumb.php: 04f3f59fd5aef047cbd82853cce2fd32
/lib/txplib_misc.php: 059953839545bda6a743978a58184ad7
/lib/class.trace.php: 055e3bc1f8d3217aec152fa7e6216b1d
/lib/admin_config.php: f228bfc7d2fe4463a16701d8a1578db1
/publish.php: f915a8d6094efdb7a990d3b398de192f
/../css.php: 853b7c8a1ba14c8ff5a89dbd41a10f8e
/../index.php: 316c9ed67bd934ef145fe7dc5336e3e6

————————————

Offline

#4 2023-04-26 12:49:03

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Database not updating - browser cache issue?

I’ve had the “Someone else is editing …” issue when I was busy fumbling between multiple tabs and several browsers, usually in the state while setting up/designing a website. Might(!) be a reason. If aggressive caching turns out and you can’t convince the involved parties, try rah_nocache. It’s against admin-side cacheing only, BTW.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2023-04-26 14:58:59

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 114
Website

Re: Database not updating - browser cache issue?

Are you using Cloudflare?

I had the exact same problem which happened precisely when I moved from an old style GoDaddy to Digital Ocean.

Cloudflare caches everything, including the edit page. So I went into Cloudflare, and under Caching->Cache Rules I added this rule.

URI Path contains /textpattern/. Bypass cache

It seems to have solved my issue.

Last edited by amordecosmos (2023-04-26 15:00:13)

Offline

#6 2023-04-26 15:51:48

Phil_
Member
Registered: 2009-09-21
Posts: 37

Re: Database not updating - browser cache issue?

@Uli I think I will try rah_nocache hopefully that will help.

@amordecosmos I’m not on Cloudflare but if rah_nocache doesn’t do this for me I think I’ll have to dive into my Apache2.conf further.

Seeing where you are from took me back to Vancouver and the Grouse Grind which I did twice when I visited, trying to get to under an hour. I’m an old giffer and didn’t break through the barrier, but close.

Offline

#7 2023-04-27 00:46:05

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: Database not updating - browser cache issue?

It is of course always possible that something in your mod_expires directives is in play, hard to say without more details.

One other option to try: open the developper tools of the browser, check on the Network pane that caching is bypassed, and leave that window open in the background while you work.

BTW where do you see that issue more often? Write panel or the Forms / Pages panels?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#8 2023-04-28 17:05:53

Phil_
Member
Registered: 2009-09-21
Posts: 37

Re: Database not updating - browser cache issue?

I have this in my Apache2 conf. See below for what I’ve also found in my main .htaccess

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType application/javascript A31536000
ExpiresByType text/javascript A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType application/json A31536000
ExpiresByType application/x-font-otf A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType application/font-woff2 A31536000
ExpiresByType application/zip A31536000
ExpiresByType font/woff A31536000
</IfModule>

This is also in my .htaccess

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault “access plus 1 month”
ExpiresByType text/css “access plus 1 month”
ExpiresByType image/gif “modified plus 1 year”
ExpiresByType image/png “modified plus 1 year”
ExpiresByType image/jpeg “modified plus 1 year”
ExpiresByType image/jpg “modified plus 1 year”
ExpiresByType application/javascript “access plus 2 hours”
</IfModule>

Maybe these are in conflict.

I notice it more in article input. Some times I’ll make an edit go and upload an image, go beck to the article I have just edited and it will be the prior version. I have now found that if I hit the browser reload (arrow circle) the new version appears. It is almost as though it isn’t going to the database each time I go to a page but rather it pulls it from the browser (or server???) cache.

Many thanks for your help. TBH today I’ve spent all day on our office Filemaker database so havn’t had a proper chance to test out rah_nocache.

Last edited by Phil_ (2023-04-28 17:08:25)

Offline

#9 2023-04-29 02:14:04

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: Database not updating - browser cache issue?

What happens when you save a change after doing some edits is that a javascript routine saves “in place” (and sends the data to the database) without a reload, and when you come back after doing some other work, the browser reloads the page from cache – the state it was when first loaded, before your edits.

Your caching directives are OK, although there is quite a bit of overlap between the two blocks. I don’t think you need both.

What you could try is adding the following line to the .htaccess file in the /textpattern folder – replace the *** with something very short (e.g. 5s):

ExpiresByType application/javascript “access plus ***”

And give the rah_nocache plugin a try.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB