⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠

datatables cache

datatables search input cache text reload page

  • Please log in to reply
21 replies to this topic

#21 DrPaul


    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 02 January 2014 - 02:47 PM

Nice trick!


Not being able to reset column ordering once I'd clicked on a column header was driving me mad :-)

#22 DrPaul


    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 20 August 2014 - 04:50 PM


As solution you can add the uncial hash-segment to url in your menu.

for example:

<div id="left menu">
<a href="...">articles</a>
<a href="....">categories</a>
<a href="your_controller/function/<?=time()?>">YOUR PROBLEM </a>


This is a great HTML tip for forcing a page to always reload because it guarantees that the page won't be rendered from the browser cache. As a web developer that has been the bane of my life while trying to debug web pages - browsers may say they've cleared the cache but they lie!


It works for image links as well, if you're in a position where images change and need to be reloaded - e.g. 

<img src="/somewhere/pic.jpg?x=<?php echo rand(); ?>">

Also tagged with one or more of these keywords: datatables, search, input, cache, text, reload, page

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users