Jump to content


datatables cache

datatables search input cache text reload page

  • Please log in to reply
21 replies to this topic

#21 DrPaul

DrPaul

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationLondon

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

DrPaul

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationLondon

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>
</div>
 

 

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