2017-05-09 74 views
1

我正在嘗試禁用所有訪問者Cookie,供我的Joomla網站使用。如何禁用Joomla 3.x中的所有訪問者Cookie

我發現了一些教程,但他們是爲Joomla版本:1.x的

有什麼建議?

+0

我面臨同樣的問題。我目前的解決方法是使用Apache mod_headers刪除「Set-Cookie」http頭。另外我跟着[this](http://elmasrydev.blogspot.hu/2014/03/how-to-disable-sessions-in-joomla-3x.html),它本身並不能解決問題,但可以有助於減少數據庫負載。我對此並不滿意,但總比沒有好。 – balping

+0

主要問題是,joomla開發人員認爲[它會太複雜](https://github.com/joomla/joomla-cms/issues/8772#issuecomment-168973989)來實現這樣的功能,所以不會恐怕很快就會成爲一個乾淨的解決方案。 – balping

回答

-1

要避免所有正常訪問者的Cookie,您需要按照以下步驟操作。

First of all: Deactivate site statistics! Global configuration -> Statistics -> Statistics: No. This will stop the "mosvisitor" cookie. 

Don't use the Template Chooser module, because it uses a cookie named "jos_user_template". 

Be careful with components: Some might start their own PHP session. 

Now to the main point: comment out line 697 of /includes/joomla.php like this: 



// setcookie($sessionCookieName, '-', false, '/'); 

附加:在/offline.php註釋掉線25:

// session_start(); 

這接縫是舊版本的僞影。

+0

感謝您的回答Kaif,但本教程提及Joomla 1.x. 在版本Joomla 3.x全局配置>靜態 - 不存在。 也在文件夾/包含/沒有這樣的文件joomla.php –

+0

問題明確問到3.x – balping

相關問題