Sign in to follow this  
maidos

do you use defer javascript?

Recommended Posts

heard theres alot of advantages of using it but high risk as it can break few js if u dont tag it properly.

whats your experience with and without?

Share this post


Link to post
Share on other sites

I was actually wondering the same...

I was planning on buying a new skin, maybe spectrum... But I use 'defer javascript', and I was wondering if it will break Ehren's new skins? Can anyone confirm?

but high risk as it can break few js if u dont tag it properly.

hey maidos, do you have a link to that thread? I wouold like a little more info on this. thnx!

Also, has anyone tried this htaccess file https://community.invisionpower.com/files/file/7514-htaccess-for-ips-forums/ using Ehren's skins? I use that on my stock install and it makes a huge difference speed-wise on my shared hosting... Just wondering if it will work for these skins also?

Edited by openfire

Share this post


Link to post
Share on other sites

Deferring the javascript should be okay, but I haven't tested it with all of my themes so no promises!

The marketplace description doesn't say what code is in the htaccess file.. I'm assuming it should work fine with my themes though.

Share this post


Link to post
Share on other sites

The file is freely available, so I'm assuming it's ok to post it here:

## IPS Suite Forum SEO
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(js|css|jpeg|jpg|gif|png|ico)(\?|$) - [L,NC,R=404]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

## End IPS Suite Forum SEO

## Begin - Expires caching
<IfModule mod_expires.c>

## This rule will create an ETag for files based only on the modification timestamp and their size. 
## Note: It may cause problems on your server and you may need to remove it
FileETag MTime Size

SetOutputFilter DEFLATE
Header set Expires "max-age=29030400, public"
Header unset ETag
FileETag None

# Enable expiration control
ExpiresActive On

# Default expiration: 1 hour after request
ExpiresDefault "now plus 1 hour"

# CSS and JS expiration: 1 week after request
ExpiresByType text/css "now plus 1 week"
ExpiresByType application/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"

# Image files expiration: 1 month after request
ExpiresByType image/bmp "now plus 1 month" 
ExpiresByType image/gif "now plus 1 month"
ExpiresByType image/jpg "now plus 1 month"
ExpiresByType image/jpeg "now plus 1 month"
ExpiresByType image/jp2 "now plus 1 month"
ExpiresByType image/pipeg "now plus 1 month"
ExpiresByType image/png "now plus 1 month"
ExpiresByType image/svg+xml "now plus 1 month"
ExpiresByType image/tiff "now plus 1 month"
ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
ExpiresByType image/x-icon "now plus 1 month"
ExpiresByType image/ico "now plus 1 month"
ExpiresByType image/icon "now plus 1 month"
ExpiresByType text/ico "now plus 1 month"
ExpiresByType application/ico "now plus 1 month"
ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
ExpiresByType application/vnd.wap.wbxml "now plus 1 month"

# Other optimizations
ExpiresByType application/x-gzip "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"

</IfModule>
## End - Expires caching

Share this post


Link to post
Share on other sites

i use google pagespeed to defer js. also select this on ur theme "Just before </body> tag"

it helped me with the pageload

although i had to tell google pagespeed to avoid specific scripts like tab comments and download but beside that it works ok. Its not really deferring every single js on ips. No idea why.

  • Like 1

Share this post


Link to post
Share on other sites

Just an FYI... I went ahead and purchased chameleon dark and applied the afformentioned htaccess, and deployed defer js ("Just before </body> tag") in theme settings. My new install loads fast, no problems whatsoever that I can see. ;)

  • Like 1

Share this post


Link to post
Share on other sites

Just an FYI... I went ahead and purchased chameleon dark and applied the afformentioned htaccess, and deployed defer js ("Just before </body> tag") in theme settings. My new install loads fast, no problems whatsoever that I can see. ;)

Great to hear! :)

Share this post


Link to post
Share on other sites

Just an FYI... I went ahead and purchased chameleon dark and applied the afformentioned htaccess, and deployed defer js ("Just before </body> tag") in theme settings. My new install loads fast, no problems whatsoever that I can see. ;)

it loads fast without. Depending on the server and the size of the site
  • Like 1

Share this post


Link to post
Share on other sites

it loads fast without. Depending on the server and the size of the site

Oh, no doubt.

But for people like me, on a crappy shared host, even a brand new install of 4.X with zero posts, zero members and using the default skin is slow without these tweaks. I just wanted to let people know that the tweaks don't conflict with Ehren's skins. ;) (at least not chameleon dark)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this