Re: Improve CuteNews Performance by Adding Page Caching

SO i checked out the 2 hacks. Only the approve hack adds something to index.php, and got nothing to do with headers.

<?php
header("Cache-Control: must-revalidate");
header("Pragma: cache");

$if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']);

$mtime = filemtime("./cutenews/data/comments.txt");
$gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';

if ($if_modified_since == $gmdate_mod) {
header("HTTP/1.0 304 Not Modified");
die();
}
header("Last-Modified: $gmdate_mod");
?>

I dont believe that this code goes into the cutenews index.php file but rather your websites main page. (index.php is the most common filename for the websites main page.)

Re: Improve CuteNews Performance by Adding Page Caching

i see... That makes sense to me.


Thanks

Re: Improve CuteNews Performance by Adding Page Caching

Hey, this is a good hack but I want it to refresh when I edit or delete something so I don't have to add a comment and delete to make it update again.

Thanks if you can help me. https://cutephp.com/forum/style_emoticons/default/smile.gif

29 (edited by 2008-01-09 23:10:15)

Re: Improve CuteNews Performance by Adding Page Caching

So does it work or not?
And what is the official code because I see it's been modified a lot.
Has anyone tested it?
And where exactly do you add the code?

Re: Improve CuteNews Performance by Adding Page Caching

No hack is official, that's why it's called a hack https://cutephp.com/forum/style_emoticons/default/smile.gif

To answer your question: don't know.

31 (edited by 2008-11-07 21:56:41)

Re: Improve CuteNews Performance by Adding Page Caching

Hi,

The final code is the one from post #7?

Re: Improve CuteNews Performance by Adding Page Caching

yep

Re: Improve CuteNews Performance by Adding Page Caching

yep


Ok, so i have to simply add the code from post #7 before

<?PHP

/***************************************************************************
 CuteNews CutePHP.com


to my script's main index.php file(the one which opens admin login page)?

Re: Improve CuteNews Performance by Adding Page Caching

yes

Re: Improve CuteNews Performance by Adding Page Caching

yes


It seems to be working, but how do I make sure?
By the way I have set filemtime path to ./data/comments.txt considering that comments.txt is located in the data directory within the same directory where index.php is, is it a correct path?

Re: Improve CuteNews Performance by Adding Page Caching

Cheers for the hack. Noticeable difference.

One thing however... when I go to the 'admin' page of Cute News, I have the following errors at the top of the page.

Warning: filemtime() [function.filemtime]: stat failed for ./cutenews/data/comments.txt in /home/paramore/public_html/cutenews/index.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /home/paramore/public_html/cutenews/index.php:7) in /home/paramore/public_html/cutenews/index.php on line 14

I presume it's something small I must of did wrong when applying the hack.

Re: Improve CuteNews Performance by Adding Page Caching

like Newuser pointed out on line 7 you must change the path to comments.txt
the 2nd warning might be related to the first.

Re: Improve CuteNews Performance by Adding Page Caching

like Newuser pointed out on line 7 you must change the path to comments.txt
the 2nd warning might be related to the first.


Can you please reply to my last post?

Re: Improve CuteNews Performance by Adding Page Caching

Can you please reply to my last post?

i thought i had answered both of you with my previous post https://cutephp.com/forum/style_emoticons/default/smile.gif
changing that path would seem ok i think, altough i think that you could use this page caching also on the pages where you have CN include codes; And then you do need ./cutenews/data/comments.txt

Re: Improve CuteNews Performance by Adding Page Caching

i thought i had answered both of you with my previous post https://cutephp.com/forum/style_emoticons/default/smile.gif
changing that path would seem ok i think, altough i think that you could use this page caching also on the pages where you have CN include codes; And then you do need ./cutenews/data/comments.txt


Thanks. https://cutephp.com/forum/style_emoticons/default/smile.gif
How do i use that caching on the pages with CN include codes?

41 (edited by 2010-04-26 02:03:24)

Re: Improve CuteNews Performance by Adding Page Caching

I am gonna try it too! https://cutephp.com/forum/style_emoticons/default/biggrin.gif

Re: Improve CuteNews Performance by Adding Page Caching

I believe this bug was fixed in IE7, I am not sure it is present in IE6, which most users use now...


Yes IE7 do not have this bug. Cheers

Re: Improve CuteNews Performance by Adding Page Caching

Thanks for these coding. This is a great help for all.

Re: Improve CuteNews Performance by Adding Page Caching

Thanks
I am using this method now..

Re: Improve CuteNews Performance by Adding Page Caching

sorry can somebody tell me how to use this codes? https://cutephp.com/forum/style_emoticons/default/mellow.gif https://cutephp.com/forum/style_emoticons/default/tongue.gif https://cutephp.com/forum/style_emoticons/default/ohmy.gif

Re: Improve CuteNews Performance by Adding Page Caching

Means only cache get the page download more faster .. but if the first time user from the organic search engine it still have to download all the page. so the site speed still slow, is the CSS in CuteNews.. Sorry for my humble question.

Thank very much you in advance ...

Re: Improve CuteNews Performance by Adding Page Caching

Someone told me you will find there's bug using IE cache and it is advisable to add "must-revalidate" inside cache command header or perhaps IE is not going to refresh the particular page just like Netscape/Firefox may.

Re: Improve CuteNews Performance by Adding Page Caching

Platinum Escort – ведущее агентство эскорт-услуг в Москве, предлагающее возможность заказа привлекательной девушки для идеального сопровождения. Мы специализируемся на предоставлении высококлассных услуг эскорта для москвичей и гостей столицы, которые желают насладиться незабываемым опытом в компании прекрасной девушки. Platinum Escort обеспечивает высокий уровень сервиса и создает уникальные впечатления для каждого клиента.
Platinum Escort отличается от других агентств эскорта своей репутацией и индивидуальным подходом. Мы гордимся нашим широким выбором привлекательных и интеллигентных девушек, которые сочетают в себе не только красоту, но и образованность. Наше агентство гарантирует, что каждая девушка, предоставляемая Platinum Escort, будет идеальным выбором для наших клиентов, обеспечивая им незабываемые моменты.
Мы понимаем, что каждый клиент имеет свои уникальные предпочтения и ожидания. Поэтому Platinum Escort предлагает индивидуальный подбор девушки, идеально соответствующей вашим запросам. Наша команда профессиональных менеджеров готова помочь вам выбрать идеальную девушку, учитывая ваши предпочтения внешности, стиля, интересов и личных требований. Мы стремимся создать наиболее удовлетворяющий вариант сопровождения, чтобы каждое мероприятие или встреча были особенными и незабываемыми.
Мы ценим и гарантируем полную конфиденциальность и безопасность наших клиентов. Platinum Escort обеспечивает абсолютную конфиденциальность всех персональных данных, предоставленных в ходе заказа девушки. Мы принимаем все необходимые меры для защиты вашей частной информации и гарантируем, что никакая информация не будет передана третьим лицам.
Platinum Escort предлагает широкий спектр услуг, чтобы удовлетворить различные потребности клиентов. Вы можете заказать девушку для различных мероприятий, включая деловые встречи, обеды, вечеринки или просто провести приятное время в компании привлекательной собеседницы. Мы гарантируем, что наши девушки впечатлят вас своим обаянием, интеллектом и красотой, создавая неповторимую атмосферу и незабываемые воспоминания.
Не упустите возможность заказать идеальную девушку в Москве через Platinum Escort. Мы предлагаем высокий уровень сервиса, непревзойденное качество и уникальный опыт в сопровождении. Свяжитесь с нами прямо сейчас и обеспечьте себе незабываемый опыт с Platinum Escort.

Загляните на наш сайт и найдите свою идеальную девушку.  эскорт услуги в москве

Posts: 26 to 49 of 49

Pages Previous 1 2

You must login or register to post a reply

CutePHP Forums → Script Feedback and Suggestion → Improve CuteNews Performance by Adding Page Caching