Minify JS the right way..?

Posted in: Newspaper
Post count: 317

Hi

I got 90 on desktop and 64 on mobile for my page speed of my site. I know there is lots of tips on the Pagespeed topic but I couldn’t figure out how to minify JS the right way so that it doesn’t break the slider and other JS of the theme.


@christopher
, I know you might know how to fix it. So, please help.

Post count: 9544

Hi, Mehedi
I usually try to use the js and css minifier links I’ve posted couple of times in the pagespeed topic …

You can also “try” to use the GTmetrix optimized versions they do for you, but I usually only minify the main couple of files (don’t recall which ones at the moment)…

You can try these

http://javascript-minifier.com/

http://cssminifier.com/

I use the CSS one all the time.

Post count: 317

Hi Christopher,

I minified style.css with that website before. Shall I minify all of the JS on the /js folder?

Post count: 9544

I would likely start with the big one (130kb?). Obviously the small ones likely don’t need it. Ideally, go by the list of “recommended minify javascript” from doing GTMetrix scan for a good pointer as to which actually need to be minified or not. I’d also likely test one at a time to make sure nothing breaks.

Post count: 317
Post count: 9544

That code actually ended up being a bit “weird” with Bootstrap, as I tried implementing it on another site and it failed to work consistently. I’m now using pure CSS buttons with Font Awesome and works just fine. The responsive problem was conflict with bootstrap code, etc. (This theme also has bootstrap 3 in its DNA.)

Post count: 9544

As to social buttons, I’m actually favoring this layout at top of posts on CNET, as an example of “nicely done” …

http://www.cnet.com/news/mozilla-expands-advertising-experiment-to-many-more-firefox-users/

Post count: 317

Can you please tell me how to do that? “(Iโ€™m now using pure CSS buttons with Font Awesome and works just fine.)”?

  • This reply was modified 11 years by mehedi.
Post count: 9544

Well, I’m not doing it on a WordPress site …

here is the basis for what I’m doing on our business site:
(tutorial, one of several out there with this specific code)
http://www.himpfen.com/social-sharing-buttons-bootstrap-font-awesome/

You can see how I’m using that code, slightly tweaked for our site here; scroll to very bottom of page (this is **NOT** using WordPress! — this is hand-built static code, based on Bootstrap 2 for compatibility with old folk running WinXP/IE6-7-8 in addition to all modern browsers):
http://www.send2press.com/services/press_release.shtml

Post count: 317

I will try it. Thanks!

Post count: 9544

These are actually very close to the same buttons used with the theme for the social sharing buttons without the number/shares info. ๐Ÿ™‚

Most folk are just hacking that file in the theme to add more buttons.

Post count: 341

Mehendi what thing you’re on your site to show the Don’t Miss fylout? when the user scrools down the page?

Post count: 317

@shashank Go to Theme Panel>Post Settings>Scroll all the way down and you’ll see a More Article Box settings. Configure it how you want and it should show up.

Also, do a search on the forum before asking simple questions. Cause this has question has been answered a lot of time.

Hope that helps ๐Ÿ™‚

Post count: 341

Thanks mehedi, It was so silly ๐Ÿ˜›

Post count: 9544

@shashank
when you have time, I do recommend going through all the documentation and tutorials, as they do provide a lot of “oh yeah” info, that I missed myself thinking I could figure it all out myself ๐Ÿ™‚

https://forum.tagdiv.com/newspaper-documentation/

Post count: 341

Right @Chris ๐Ÿ˜›

Post count: 317
Viewing 17 posts - 1 through 17 (of 17 total)
You must be logged in to reply to this topic.