Forums » SEPHP Help and Tips

Remove query string from static ressources

    • 23 posts
    November 20, 2017 12:30 PM EST

    Hello,

     

    all my CSS and js resources get included with a query string smoothbox4.js?c=29 for example.

    I want to remove this as it improves caching of those files and make my site slower.

     

    OT: how to tune social engine? I have many members and content now, and my website gets slower and slower by every new member. I did some performance testing with dynatrace and found that there could be some improvements in queries in version 4.10

     

    I think when removing those query string, my site speed will improve x2!

     

    regards

     


    This post was edited by asljdkfhasdf at November 20, 2017 12:31 PM EST
    • 23 posts
    November 20, 2017 12:51 PM EST

    I have found a solution:

     

    goto: application/modules/Core/layouts/scripts/default.tmpl and comment out the whole if block

    <pre style="background-color: #ffffff; color: #000000; font-family: 'Courier New'; font-size: 9,0pt;">if (!empty($dat->attributes['src'])) { }<br>and</pre> <pre style="background-color: #ffffff; color: #000000; font-family: 'Courier New'; font-size: 9,0pt;">if (false === strpos($dat->attributes['src'], '?')) {<br><br>Im not sure if that breaks something yet.<br><br>Also FireFox sending Pragma: no-cache and Cache-Control: no-cache which is strange!! Someone knows why this is??<br><br><br><br></pre>
    • 23 posts
    November 20, 2017 12:51 PM EST

    I have found a solution:

     

    goto: application/modules/Core/layouts/scripts/default.tmpl and comment out the whole if block

    <pre>if (!empty($dat->attributes['src'])) { }<br>and</pre> <pre>if (false === strpos($dat->attributes['src'], '?')) {</pre>  Im not sure if that breaks something yet.

    Also FireFox sending Pragma: no-cache and Cache-Control: no-cache which is strange!! Someone knows why this is??


    This post was edited by asljdkfhasdf at November 20, 2017 12:51 PM EST
    • 23 posts
    November 20, 2017 12:55 PM EST

    Ahh i found out that i set disable caching in developer tools of firefox

    • 23 posts
    November 20, 2017 1:03 PM EST

    SO I reall yfound out that firefox doest cache content with query string and loads about 100 scripts from the server on each request by removing the query string firefox caches every **Admin edited profanity ** file. What an improvements.

    does it break something @socialengine ?


    This post was edited by Donna at November 20, 2017 2:40 PM EST
    • Moderator
    • 4210 posts
    November 20, 2017 2:38 PM EST

    I edited your above post. We do not allow that word here nor anything that looks like that word. I find that word offensive. 

    As for your other posts here, thanks for posting. Are you saying you found a solution or that you've not? 

    • Moderator
    • 4210 posts
    November 20, 2017 2:49 PM EST

    Ok reading your first comment, you say the site is slower. Is this in front end or admin or both? I think I know of a post someplace for some tips. I'll see if I can find it.

    • Moderator
    • 4210 posts
    November 20, 2017 2:52 PM EST

    https://support.socialengine.com/php/customer/en/portal/articles/1637065-socialengine-performance-and-speed-enhancement-tips?b_id=14386 try those tips. One more tip - clear your error logs. It can get massive. Go to your admin panel and the log browser and delete the error logs after you've checked it to see any errors on the site. Fix errors on the site if you see some.

    • 23 posts
    November 21, 2017 2:27 PM EST

    Thank you very much Donna laughing Its the frontent


    This post was edited by asljdkfhasdf at November 21, 2017 2:28 PM EST
    • Moderator
    • 4210 posts
    November 22, 2017 4:50 AM EST

    Ok did those tips help?

    • 23 posts
    November 22, 2017 12:56 PM EST

    Yes thanks for the help.