311 Topics

Member Avatar for
Member Avatar for Dani

I happily just discovered the Cache-Control rules *stale-if-error* and *stale-while-revalidate*. I came across [an article](https://developers.cloudflare.com/cache/concepts/cache-control/) on Cloudflare's site that says that those two directives are ignored if CF's Always Online feature is enabled, so I've gone ahead and disabled that. However, I'm confused by the following quote: > The stale-if-error …

0
14
Member Avatar for manmohan419

I'm currently working on enhancing the user experience for the <snipped> app, and I've run into a bit of a roadblock. I'm trying to optimize the game lobby to ensure smooth navigation and quick loading times, especially as our user base continues to grow. However, I'm finding that even with …

Member Avatar for jonathannweyer
0
108
Member Avatar for Mikekelvin

When working with RecyclerView, always utilize the ViewHolder pattern to improve performance by minimizing the number of findViewById() calls. public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { public static class ViewHolder extends RecyclerView.ViewHolder { TextView textView; public ViewHolder(View itemView) { super(itemView); textView = itemView.findViewById(R.id.textView); } } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int …

0
50
Member Avatar for Dani

Everyone knows that PHP has such a bad rap for so much bad code being out there. I am a firm believer it is not a problem with PHP, itself, but rather the incredibly low barrier to entry (open source, readily available with nearly all web hosting packages, etc.) coupled …

Member Avatar for jkon
0
242
Member Avatar for borobhaisab

Hello There, Do you have any experience how to run a dns cache ? I want to learn how to run a dns cache and log what my users are browsing onto a webpage. In other words, the Log File should turn into a webpage be it with .html or …

Member Avatar for borobhaisab
0
19
Member Avatar for Dani

When I run `getStats()` on my PHP instance, it results in the following: array ( '10.143.27.235:11211' => array ( '����' => '', 'pid' => 3602, 'uptime' => 49804, 'time' => 1663088274, 'version' => '1.5.22', 'libevent' => '2.1.8-stable', 'pointer_size' => 64, 'rusage_user' => 30.254434, 'rusage_system' => 62.188442000000002, 'max_connections' => 4096, 'curr_connections' …

Member Avatar for Dani
1
68
Member Avatar for Dani

I'm trying to get Memcached persistent connections to work. We currently have a cluster of four Memcached servers each with 2GB of RAM, and four web servers. My code looks like this: public function __construct() { global $config; $this->cache = new Memcached('daniweb'); if ($this->cache->isPristine()) { $this->cache->setOptions(array( Memcached::OPT_NO_BLOCK => true, Memcached::OPT_BUFFER_WRITES …

Member Avatar for Dani
0
1K
Member Avatar for mtyide

I need to get a set of results from the db (server) but at times I would get the same result back and I would like to cache the result instead of making the same call to the db. Any ideas?

Member Avatar for rproffitt
0
335
Member Avatar for Dani

Starting September 1st, about 25% of crawl requests started returning 304 Not Modified instead of 200 OK. Prior to that, there were just a small handful of such requests per day. I did not make any code changes that would introduce returning this header. Once I noticed, however, I tried …

Member Avatar for Dani
1
205
Member Avatar for Dani

This question specifically relates to PHP's Memcached library when specifying a server key and adding multiple keys at once. **Question one**: Is it true that PHP's setMultiByKey() doesn't take advantage of the memcached server's native support for setting multiple keys at once, but that the logic is on PHP's side …

0
271
Member Avatar for Dani

Our CSS and JS files are not being re-downloaded by web browsers when we update them. The response headers look like this: cache-control: max-age=7776000 content-encoding: gzip content-type: text/css; charset=UTF-8 date: Sat, 01 Feb 2020 02:41:59 GMT etag: W/"5e34c19d-68a08" expires: Fri, 01 May 2020 02:41:59 GMT last-modified: Sat, 01 Feb 2020 …

0
922
Member Avatar for syria718

<?php include 'ProcessDAO.php'; $dest=""; if(isset($_POST['login'])){ session_start(); // i get an error in this line !! $_SESSION['status']='online'; $_SESSION['breadcrumb']='home'; $pro = new ProcessDAO(); $dest = $pro->LogIn($_POST['username'],$_POST['password']); }else{ session_start(); $dest ="Location: ../index.php"; session_destroy(); } header($dest); ?> guyss can you help me out because in my Login.PHP file when i login i always get …

Member Avatar for Dani
0
8K
Member Avatar for Dani

I'm getting ` Session: Error while trying to free lock for ci_session` show up in the error log a couple times a minute, sometimes, and every 15 minutes other times. Using Redis for sessions. It's not happening on a different server that has almost the same code base and is …

Member Avatar for Dani
0
4K
Member Avatar for jkon

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 …

Member Avatar for Trasser
1
2K
Member Avatar for memegha123

hI! I m trying to create a simple login application in jsp where i create a session allows the user to use certain features and then logout. Problem is that after the user logs out. I destroy all session objects and invalidate the session and redirect to welcome page still, …

Member Avatar for youngbill
0
3K
Member Avatar for davy_yg

Hello, I have a website that I built after editing it requires the user to clear browser cache to see the updated website. My question is does it requires everyone who have open the website for the first to clear browser cache to see the updated? What if the first …

Member Avatar for KushMishra
0
250
Member Avatar for SimonIoa

Hello, i want to cache embedded urls -YouTube, Vimeo- photos and videos so that i could reduce bandwidth usage and server load for my website. How can i help my website to do that? I know that browsers cache information `https://en.wikipedia.org/wiki/Web_cache`. Is there something i can to do to make …

Member Avatar for cereal
0
374
Member Avatar for Var_1

Hello everyone, I'm currently developing a webpage that when user input the data needed in Advance Filtering and click on the button'Search Result',the table will show the data needed,but the problem is i get the error of Uncaught TypeError: Cannot read property 'fnDraw' of undefined when the user choose the …

Member Avatar for essential
0
755
Member Avatar for lewashby

I recently created a post thinking I had blown up my bootloader but I've actually narrowed the problem down to the SSD on which my home directory is mounted. The reason my computer has not been booting is because my system is not mounting my home directory's SSD. This started …

Member Avatar for alc6379
0
1K
Member Avatar for Saqlainz

Cache in local storage of browsers gets cleared when website page redirects from AliPay payment website. This is happening in some computers and working fine in some. From my website user selects AliPay payment method then user is redirected to payment website and on successful payment is being redirected back …

Member Avatar for rproffitt
0
496
Member Avatar for Alexandro

I get an error with nero 7 for DVD-R type DVD: illegal disk, but for other DVD types DVD+r,Double layer,+RW is no problem. Here is the log of nero: Windows XP 5.1 IA32 WinAspi: - NT-SPTI used Nero Version: 7.10.1.0 Internal Version: 7, 10, 1, 0 Recorder: <SONY DVD RW …

Member Avatar for Stephen_19
0
691
Member Avatar for Dani

Dazah API uses Redis to handle rate limiting. The goal is to limit every each client_id/user_id pair from making over 5,000 requests every 5 minutes. We use Codeigniter 3.x and it looks something like this: $flood_control = $CI->cache->get("user_limit:{$token_obj->client_id}:{$token_obj->user_id}"); if ($flood_control === false) { $CI->cache->save("user_limit:{$token_obj->client_id}:{$token_obj->user_id}", 0, 300); } else if ($flood_control …

Member Avatar for cereal
0
769
Member Avatar for developer707

Hello, Recently I am dealing with bad performance in an php application that I have build, googling this issue I found out that using services like memcached you can archive a huge performance improvements. The weird thing comes when I try to find a very good and detailed example I …

Member Avatar for Dani
0
650
Member Avatar for gentlemedia

I've noticed the last couple of weeks that a hard-refresh won't clear the cache anymore in Chrome... well to me and two clients of mine (we're all on a Mac by the way). Not sure either if there was an update to Chrome recently which might cause this now. Did …

Member Avatar for rproffitt
0
575
Member Avatar for v1shwa

I use a webservice to pull some data from it everyday & update it on my MySQL database. I'll make around 600 calls to this service. The webservice response is very slow (takes around 30 minutes to complete 600 transactions) & during this time, the MySQL is also giving slow …

Member Avatar for Tomaski
0
441
Member Avatar for Waqas_4

i am getting error Not Found The requested URL /home was not found on this server. please overview my code here . specially main functions are servePage and displayPage . <?php /** * Copyright 2009 - 2011 Color Shift, Inc. * * @package Luminance v4.0 * * This class handles …

Member Avatar for rubberman
0
324
Member Avatar for Stephano

I have a code that is going to pick the page title of the previous page and autopopulate a field in a form i have created. Users pick the job they want then upon clicking apply the go to an application form. There is a field that is being autopopulated …

Member Avatar for Stephano
0
133
Member Avatar for bigignoramus

I have been wrestling with this subject for six months and can find no complete answer anywhere on the web or in any book seen. I have become very familiar with the debate and so it is not necessary to debate the following here. I had rather do all of …

Member Avatar for gentlemedia
0
2K
Member Avatar for Hugo_1

pls i have a syntax error here... i have syntax error in line2 .... <?php mysql_query("insert into $s[pr]ad_type_google_dhtml VALUES (5, 'var dhtmlwindow={\r\najaxbustcache: true, //Bust caching when fetching a file via Ajax?\r\nminimizeorder: 0,\r\ntobjects: [], //object to contain references to dhtml window divs, for cleanup purposes\r\ninit:function(t){\r\n var domwindow=document.createElement(\"div\") //create dhtml window div\r\n …

Member Avatar for Nishant shukla1
0
294
Member Avatar for James_43

Hi all, my understanding was that Nginx doesn't do any caching unless you tell it to. However, for some reason, all my filles are being cached, and so the website doesn't respond to change in css or js files etc. I thought that the below server{} code would help: location …

0
117
Member Avatar for James_43

Hi all, Brand new to nginx, but it seems to be the rising star, and suited to hosting high volumes like I'm doing. However, I'm having trouble setting up the config files. A day of google searching hasn't really helped. My nginx.conf looks like: events { worker_connections 768; # multi_accept …

Member Avatar for James_43
0
256
Member Avatar for jkon

Although objects collections have a place in the PHP world many years now , their use is now flourishing because more and more PHP programmers turn to OOP. This tutorial is a sequel of https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications (we will refer to it as “previous tutorial”) and https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications , in order to understand …

Member Avatar for jkon
2
853
Member Avatar for jkon

Hello, This tutorial is the next of “[A simple Data Layer for OOP PHP Applications](https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications)” so having read it and made your own tests is needed to understanding what we are doing. So far we have a Db object (child of PDO that standardize and simplifies its use) , a …

Member Avatar for jkon
4
619
Member Avatar for pritaeas

You have some serious query/caching issues. Times vary but slow nonetheless. Finder -> My Bookmarks Page generated in 26.1996 seconds with 8 database queries and 7 memcached requests using 6.01MB of memory Latest Posts Page generated in 16.5247 seconds with 5 database queries and 6 memcached requests using 4.71MB of …

Member Avatar for Dani
0
253
Member Avatar for Tinnin

Hi All, I'm trying to set up an application cache for offline viewing. I'm using a custom built mvc framework. I'm having trouble getting anything to work regarding the application cache. It's as though the .appcache file isn't even being picked up. My set up is as follows: referencing the …

0
197
Member Avatar for jkon

There is a problem with static variables and functions in how it is used by apps and frameworks in PHP , they are used as global functions or parameters while this is by far what they mean. It is easy to write the same functional or even procedural code in …

Member Avatar for pritaeas
0
305
Member Avatar for Mike Askew

Hi All We are having an issue where a WSDL is loading another WSDL into it when we call it. This call takes a while on the first call which normally causes failures across the application during testing. One option we are looking into is pre-caching the WSDL in IIS …

1
311
Member Avatar for mike_2000_17

This tutorial is the first time I write about coding techniques for improving the performance of software. This is going to be a step-by-step journey through a real example, with real benchmark results at every step so that you can see the effect of the different optimization techniques. And as …

Member Avatar for NathanOliver
7
2K
Member Avatar for KnifeDarky

Hello, so I'm completely re-designing and updating files on the website, but the problem is, that everytime I change e.g. index.html file the website stays the same. I think that it has something to do with the browser's cache. It happens more often on Firefox, but I just hit ctrl+f5 …

Member Avatar for KnifeDarky
0
254
Member Avatar for SimonIoa

Hello i have a problem with my website. It is running slow. I asked the my server provider why is that, and they replied its because the webiste uses many embedded urls like youtube, vimeo, dailymotion and so on. And so i have to cache these embedded urls. I tried …

Member Avatar for SimonIoa
0
604
Member Avatar for mattster

Hi All, I am working with a Magento (v1.8.1) site, which until a week or so ago, was working perfectly. I am using the SM_AMAZ theme, and have no plugins which could interfeare with performance. Everything will be fine, then something in the admin panel will get changed, and the …

Member Avatar for imti321
0
388
Member Avatar for ikocrush

I have two GridView(SalesGView and ProdGView). SalesGView contains dropdowlist and textboxes.ProdGView is wrapped with ModalPopup and is populated by dropdownlist selection from ProdGView. The issue is when i click button select on ProdGView, the dropdownlist in the SalesGView resets to default value (Electronics) instead of selected value. ![8be5f775389c07cf2e69523f9a9acc02](/attachments/large/4/8be5f775389c07cf2e69523f9a9acc02.gif "8be5f775389c07cf2e69523f9a9acc02") ![e18fcc134ee66aba638d8b21471b6a61](/attachments/large/4/e18fcc134ee66aba638d8b21471b6a61.gif …

Member Avatar for Richard Mon
0
524
Member Avatar for coder123

Dear experts I am running one mysql query which contains selection from multiple tables.The problem is sometimes the query runs very slow, but sometimes it is ok.Acctually when i run it first time it is very very slow, and from the next time it becomes fast.I wonder if it is …

Member Avatar for janissantony
0
392
Member Avatar for waqar60655

I read a bit around here, but as I'm a newbie I couldn't configure what to change the description to on my own, can someone help me? I get this error: ` Warning: Illegal string offset 'members_seo_name' in F:\Server\xampp\htdocs\ipbwaqar\admin\sources\classes\output\publicOutput.php(3526) : eval()'d code on line 12` **publicOutput.php looks something like this:** …

Member Avatar for XSSalpa
0
2K
Member Avatar for shilu2

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:4.0.30319.17929 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict Off Option Explicit On Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.ReportSource Imports CrystalDecisions.Shared Imports …

Member Avatar for Santanu Das
0
1K
Member Avatar for wazz

asp.net caching question: when using output caching, a location for the caching can be set - any, client, downstream, server, etc. is it possible to set a location when setting clientCache in web.config? i have set cacheControlCustom="public". i can't find a reference to any other options. could i use 'client …

0
65
Member Avatar for pritaeas

Was updating tags, at some point I got to this: http://www.daniweb.com/tags/tables Is this a caching issue? It's showing "usability" and "excel". I do come across tags in the tagclouds, where the link goes to the "Oops" page (e.g. http://www.daniweb.com/tags/three). Am guessing it's because I removed that tag, but the cached …

Member Avatar for Dani
0
114
Member Avatar for iamthwee

I'm just wondering what the codeigniter caching library does and where it might be useful, or what problems people have encountered with it are.

Member Avatar for Dani
0
395
Member Avatar for Eric_9

I have the following code in my .htaccess file to leverage browser caching (and gzip), however when I run tools such as Google Page speed or Gtmetrix I still am getting the error tha my website is not using leverage browser caching. [Link to my website](www.ericbartolo.com) .htaccess code: <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|pdf|flv|mp3)$"> …

Member Avatar for Arun kumar 47
0
1K
Member Avatar for veedeoo

**Part One**: Learning the Basic Patterns **Disclaimer**: please pardon my spellogrammatico errors. I am not really a rough draft person. I type and write codes the split seconds as they crossed my mind, otherwise I will get extremely lazy and then will eventually hibernate like a tardigrade. I hope I …

Member Avatar for veedeoo
3
2K

The End.