[TYPO3-english] Facebook Like Plugin decreased My Website Performance and Increased Page Load Time Significantly

Philipp Gampe philipp.gampe at typo3.org
Sat Nov 10 01:18:55 CET 2012


Hi UGUR KOCAK,

UGUR KOCAK wrote:

> but the page load time increased significantly

No wunder if you put the JS into the head. This means that the webbrowser 
needs to wait with the rendering until it get the response from Facebook.

Add the JS at the buttom of the page with one of the config.includeJS* 
functions.

Do not use a PHP file to set the headers (this won't work that way with 
TYPO3 CMS), but set up proper .htaccess rules.
e.g. the default _.htaccess shipped with TYPO3 CMS already includes:

-----8<--------------8<--------------------8<-------------
# Enable long browser caching for JavaScript and CSS files.                                         
                                                                                                    
# This affects Frontend and Backend and increases performance.                                      
# You can also add other file extensions (like gif, png, jpg), if you want 
them to be longer cached, too.
                                                                                                    
<FilesMatch "\.(js|css)$">                                                                          
  <IfModule mod_expires.c>                                                                          
    ExpiresActive on                                                                                
    ExpiresDefault "access plus 7 days"                                                             
  </IfModule>                                                                                       
  FileETag MTime Size                                                                               
</FilesMatch>

-----8<--------------8<--------------------8<-------------

So all JS and CSS files are already cached for seven days. You can savely 
expand this to "1 year" caching as TYPO3 appends a get parameter based on 
the last modification time to make sure a change file is requested again.


You way also want to google for "page speed optimazations".

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – linkvalidator
TYPO3 .... inspiring people to share!



More information about the TYPO3-english mailing list