[wp-trac] Re: [WordPress Trac] #4067: Changes to TinyMCE filters don't get updated due to browser cache

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 22 19:42:15 GMT 2007


#4067: Changes to TinyMCE filters don't get updated due to browser cache
----------------------------+-----------------------------------------------
 Reporter:  Viper007Bond    |        Owner:  anonymous   
     Type:  defect          |       Status:  new         
 Priority:  low             |    Milestone:  2.4 (future)
Component:  Administration  |      Version:  2.2         
 Severity:  minor           |   Resolution:              
 Keywords:  needs-patch     |  
----------------------------+-----------------------------------------------
Comment (by ev3rywh3re):

 The only method I know of that helps is to "fake load" the
 tiny_mce_config.php file.

 I've done this by loading up a file with bogus TinyMCE_Engine javascript
 followed by an include of tiny_mce_config.php in my plugin admin page
 where they make the setting changes. So basically once the configuration
 is changed the tiny_mce_config.php file has been updated and should be
 cached because they loaded it without using it... kinda. At this point
 most users can just reload the editor pages and see the updated editor.

 This is what I put in "admin_head" for the plugin config page:

 {{{

 <script type='text/javascript' src='<?php echo get_settings('siteurl');
 ?>/wp-content/plugins/myplugin/js/bogus_tinymce.js?up=<?php echo rand(101,
 199); ?>'></script>
 <script type='text/javascript' src='<?php echo get_settings('siteurl');
 ?>/wp-includes/js/tinymce/tiny_mce_config.php?up=<?php echo rand(101,
 199); ?>'></script>

 }}}

 I don't know if adding the random numbers helps or not :P

 Here is the example bogus "bogus_tinymce.js" Javascript file that is
 included in "admin_head":
 {{{

 /* for bogus tinymce.init */

 function TinyMCE_Engine() {
 };

 TinyMCE_Engine.prototype = {
         init : function(settings) {
         },
         loadPlugin : function(settings) {
         }
 };

 var tinyMCE = new TinyMCE_Engine();


 }}}

 Hope that helps.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4067#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list