caching

What is the best way to force an image refresh on a webpage?

南笙酒味 提交于 2020-02-02 12:03:21
问题 I have a an asp.net-mvc site. On one of the pages, I have an image, I use jcrop to allow users to crop the image. When this click submit, I crop the image on the server side and then reload the page. The issue is that the image looks the same as before . . if i hit F5 and refresh the page then the updated image shows up.. Is there anyway to avoid having to force a F5 refresh in this case? 回答1: This is a trick, but it works. Put a variable and random number in the image url. Something like:

How to clear the cache in Typo3 from an external script?

房东的猫 提交于 2020-02-01 09:16:26
问题 I do have a PHP script, which is not an extension for Typo3. Now I would like to delete the whole Cache of Typo3 out of this script. How is that possible? 回答1: install the TYPO3 Extension cleartypo3cache create a tool and a keyboard shortcut in PhpStorm 4 to trigger cleartypo3cache SSH access with passwordless pubkey authentication when pushing to a remote host. Install Extension " cleartypo3cache " and create the BE user " _cli_cleartypo3cache " and add the following TSconfig: options

What's difference between hibernate caching and Spring framework cache?

ぃ、小莉子 提交于 2020-01-31 08:54:09
问题 I have an application where I get the data from database (using hibernate). I want to load the cache (per user) with database state once per day and use the cache instead. I'm using Spring framework with Hibernate and I know that both of them have some caching possibilities. What are the differences between them? What would be a better choice? 回答1: Starting with Hibernate cache is a more prudent decision in my view, especially because the two don't exclude each other. In terms of performance

Prevent bundle from responding if cache buster doesn't match content

拟墨画扇 提交于 2020-01-31 04:22:25
问题 I'm using Bundling and Minification across a server farm where there is a cross-over period of old and new servers. The issue I have is that the old servers are caching the content of the new bundle cache buster URL. For example the new HTML is cached with the new bundle URL: <script src="/bundle.css?v=RBgbF6A6cUEuJSPaiaHhywGqT7eH1aP8JvAYFgKh"></script> This then makes a request to an old server which hasn't yet been updated with the new CSS code and this then cached. Any subsequent calls to

Prevent cache in every Dojo xhr request on page

可紊 提交于 2020-01-30 11:17:07
问题 I'm able to intercept Dojo 1.6.1 xhr requests using IO Pipeline Topics as described here: Dojo - intercepting XHR calls I would like to add a time parameter to the URL (f.e. &time=12345 ) to prevent cache in certain (or all) xhr GET requests originating from dojox.data.JsonRestStore (details of what I'm trying to achieve are here). My code looks like this: dojo.subscribe("/dojo/io/send", function(deferred) { if (deferred.ioArgs.url.indexOf("restService1") > -1) { deferred.cancel(); deferred

Prevent cache in every Dojo xhr request on page

时间秒杀一切 提交于 2020-01-30 11:16:10
问题 I'm able to intercept Dojo 1.6.1 xhr requests using IO Pipeline Topics as described here: Dojo - intercepting XHR calls I would like to add a time parameter to the URL (f.e. &time=12345 ) to prevent cache in certain (or all) xhr GET requests originating from dojox.data.JsonRestStore (details of what I'm trying to achieve are here). My code looks like this: dojo.subscribe("/dojo/io/send", function(deferred) { if (deferred.ioArgs.url.indexOf("restService1") > -1) { deferred.cancel(); deferred

need to change codes file_get_contents with cURL code

拜拜、爱过 提交于 2020-01-30 11:05:35
问题 I need this code done without file_get_contents, because my server doesn't allow to change php.ini . cURL works good. So maybe someone can make it work with cURL ? this is the code i have right now: (A guy once helped me make this and it worked, but now i have new host and it won't let me change allow_url_open) // List of players to fetch data for $players = array('FixAlot','Kringel'); // URL to get statistics from define('LOL_URL', 'http://euw.leagueoflegends.com/ladders/solo-5x5'); // for

need to change codes file_get_contents with cURL code

血红的双手。 提交于 2020-01-30 11:04:21
问题 I need this code done without file_get_contents, because my server doesn't allow to change php.ini . cURL works good. So maybe someone can make it work with cURL ? this is the code i have right now: (A guy once helped me make this and it worked, but now i have new host and it won't let me change allow_url_open) // List of players to fetch data for $players = array('FixAlot','Kringel'); // URL to get statistics from define('LOL_URL', 'http://euw.leagueoflegends.com/ladders/solo-5x5'); // for

need to change codes file_get_contents with cURL code

亡梦爱人 提交于 2020-01-30 11:03:58
问题 I need this code done without file_get_contents, because my server doesn't allow to change php.ini . cURL works good. So maybe someone can make it work with cURL ? this is the code i have right now: (A guy once helped me make this and it worked, but now i have new host and it won't let me change allow_url_open) // List of players to fetch data for $players = array('FixAlot','Kringel'); // URL to get statistics from define('LOL_URL', 'http://euw.leagueoflegends.com/ladders/solo-5x5'); // for

Output Excel file in PHP after echo

自作多情 提交于 2020-01-30 03:17:26
问题 HI, I am trying to display results from a database in results.php. In the same file, after all the data has been displayed in the current webpage,I am placing a button to create a file based on this results to produce a Excel file. I am not sure how to do this. I have tried but it says you have to force excel file download before any echo, but I want to display as well as produce an excel file. Is this possible or am I missing something? can anyone please let me know how to do this correctly?