Kinetic Pulse
  • Home
  • Services
  • Portfolio
  • Blog
  • Terms
  • Contact

Quick performance boost

December 15, 2016

If you have access to your Apache / NGINX config files, then these directives will significantly boost your site speed. Pretty standard GZip and Browser Expiry but it’s easier than using htaccess I think


# Enable Gzip compression
gzip on;

# Compression level (1-9)
gzip_comp_level 5;

# Don't compress anything under 256 bytes
gzip_min_length 256;

# Compress output of these MIME-types
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/javascript
text/x-component;

# Disable gzip for bad browsers
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

location ~* \.(txt|xml|js)$ {
expires 8d;
}

location ~* \.(css)$ {
expires 8d;
}

location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$ {
expires 8d;
}

location ~* \.(jpg|jpeg|png|gif|swf|webp)$ {
expires 8d;
}

Mask email address

October 24, 2016

Sometimes clients just won’t accept the advice to use a contact form, and instead insist on having their email address on the site. This, of course, is just an open invitation to spambots scraping the address straight off the site.

A simple solution is to use javascript to mask the address thus fooling the cheeky little bots:

var username = "[your_username]";
var hostname = "[your_mail_account_domain]";
var linktext = username + "@" + hostname ;
document.write("" + linktext + "");

Using Google API to get feed from Blogger

August 7, 2014

I had previously used the php library SimplePie to pull in blog posts from a clients Blogger blog to show on the their Zencart site.

And it worked well – until the hosts did a PHP upgrade and it stopped working (thanks 1&1!)

No matter what I tried – different versions of SimplePie, debugging lines of code – would make it work again. So I needed another solution.

Google to the rescue. Using their Google Feed API I managed to pull the feed data into the page:

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

    function initialize() {
      var feed = new google.feeds.Feed("http://lawandcompany.blogspot.com/feeds/posts/default");
      feed.setNumEntries(10);
      feed.load(function(result) {
        if (!result.error) {
          var container = document.getElementById("feed");
          for (var i = 0; i < result.feed.entries.length; i++) {
            var entry = result.feed.entries[i];
            var h2 = document.createElement("h2");
            h2.innerHTML="<a href='"+entry.link+"'>"+entry.title+"</a>";
            container.appendChild(h2);
	    var content = document.createElement("p");
            content.innerHTML = entry.content;
            container.appendChild(content)
	    var postdate = document.createElement("p");
	    var d = new Date(entry.publishedDate);
	    var curr_date = d.getDate();
	    var curr_month = d.getMonth() + 1; //Months are zero based
	    var curr_year = d.getFullYear();
             postdate.innerHTML ="<small>Posted on: "+curr_date + "-" + curr_month + "-" + curr_year+"</small>";
            container.appendChild(postdate)
          }
        }
      });
    }
    google.setOnLoadCallback(initialize);

    </script>
    <div id="feed" class="item"></div>

You can see it in action here:
http://www.lawandcompany.com/blog

Help – I’m locked out of WordPress! Adding users to the WP database using MySQL

April 7, 2014

I’ve just had this query from a client – well more that he had a site that was out of date and was showing errors (from a host who had upgraded the version of php and the version of WP the client was running was showing up deprecated errors.) So I said I would sort it out for him – but the name & password that had worked before was simply not working for me.

Time for some drastic action. [Read more…]

Useful WordPress snippet: Adding styles dropdown & custom css to the TinyMCE editor

March 31, 2014

The following php code snippet for WordPress does two things:
1) Specifies a new stylesheet that will be referred to by the TinyMCE editor in WordPress, so you can add the default font styles for the users so that when they are typing their copy it more closely mimics what they will see on the live site
2) Adds a new Styles drop down which lists all the classes that are available to allow users to specify a class to be applied to a particular paragraph
[Read more…]

  • 1
  • 2
  • 3
  • …
  • 16
  • Older

Testimonials

I like it.  I like it a lot !!!

 You have interpreted what I wanted to achieve perfectly considering what you have to play with i.e not redoing the whole thing in the process.

Fiona Simmons-MooreSouth Gloucestershire Parents & Carers
Thank you for all of your hard work its looks fab and I am over the moon with it!
Amanda MercerAmanda Mercer Ceramics
Absolutely fantastically professional web developer – I would highly recommend!!! Thank you so much Kinetic Pulse!
Tania MarstonDoris Designs
Thanks so much for all your work on this, really appreciated. It’s come on in leaps and bounds since you took over.
Pete KewRedwood Strip Curtains
It’s been fab working with you – we love the site and certainly going to recommend you!
James DaviesThirty Eight Degrees North
Thank you guys so much for all that you’ve done helping us to create a really awesome website!! We get such great feedback – everyone loves it & we couldn’t be prouder! Look forward to working with you again soon!
Wild Thyme PlantsWild Thyme Plants
Amazing and brilliant, Kinetic Pulse have lifted a dream to reality, Highly recommended and great if you are total novice, they know their stuff…Thanks again
Annie LindridgeSalt Yourself Out

Copyright 2025 Kinetic Pulse