Problems with site speed detected with GMetrix (Variant: accept coding header)

Hi guys,

I'm not sure if this is the right place to ask this, but I just did a GMetrix test for one of my pages and got a 60% score.

I have an F in this: Enter a Vary header: Accept-Encoding

The solution I found was to add this in .htaccess:

Header Attach Vary: Accept-Encoding

When I try to run the test again, GMetrix tells me exactly the same thing, that I'm missing the Vary header. But the header is there, I can see it in my browser and I also ran a curl check that shows me this:

Cache control: max-age = 2592000
Expires on Tuesday June 18, 2019 13:33:19 GMT
Vary: Accept-Encode
Content encoding: gzip

What am I missing? I am not sure if it is allowed to put the link of my website here.

any help is appreciated,

Can I get some speed tips from Google Pages?

Can anyone give me some advice on my site (, how to fix my page speed score?

I use the LiteSpeed ​​Cache plugin in it and I have added Cloudflare CDN, and I have enabled gzip compression, css / js compressed, lazy loading activated and other things recommended by pagepeed, GTmetrix, Pingdom.

SQL Server – Storage time – speed vs. space

I need to store a weekly schedule as compact as possible. The schedules are in increments of 15 minutes. In a 24-hour period that would give me 96 timespaces. Midnight is 00, 0600 is 24, 1800 is 72 and 2345 is 95. I need to store 7 days of information per SO record … Search speed depending on the space, is it more efficient to create a record with 14 small columns (Time start and end time for each day) or 1 column that concatenates filled-in numbers? (IE 2472247224722472247224722472)

There could be millions of records, so I want to try to reuse common schedules. This means that when someone creates a schedule, I want to look for the schedules that have already been created to find a match and use the ID of the match if I can find one. If not, I will create a new record. Would the use of 14 AND statements in smallints be faster than a character field search? Is there an even better way to do this?

MS SQL Server by the way.

javascript: stuck at the speed of Goomba and canceling the animation during the game

I will try to be as accurate as possible.

First problem: if you look at the code, I have a drawObjects function that calls the collisionDetection function.

Internal collision detection if the player (mario) touches the object (Goomba), the game should have ended and the animation should stop.

However, even when canceling the animation box, the animation will not stop in any way.

Second problem: I want to accelerate the objects (Goomba) but if I try to reduce their position x in more than two (that is, objects)[i].x – = 3 for example), the object (goomba) is not shown at all, except the first one.

So, on this topic, what I'm looking for is, is there another better way to accelerate goombas?


                var startTime = 0;
var rAF;

var cnv = document.getElementById ("canvas");
var ctx = cnv.getContext ("2d");

var cWidth = cnv.width = window.innerWidth-10;
var cHeight = cnv.height = window.innerHeight-20;

var bgImg = new image ();
var playerImg = new image ();
var goombaImg = new image ();

bgImg.src = "";
playerImg.src = "images / mario.png";
goombaImg.src = "images / goomba.png";

var game = {
state: true,
score: 0

var player = {
x: 15
and: cHeight-110,
w: 75,
h: 75,
canJump: true,
x Speed: 0,
and Speed: 0

objects var = [];
objects[0]= {
x: cWidth-110,
and: cHeight-90,
w: 50
h: 50,


var = controller {
moveLeft: false,
move up: false,
moveRight: false,
keyListener: function (event) {
var keyState = (event.type == & # 39; keydown & # 39;)? true False ;

switch (event.keyCode) {
Case 37:
controller.moveLeft = keyState;

Case 38:
controller.moveUp = keyState;

case 39:
controller.moveRight = keyState;


document.addEventListener (& # 39; keydown & # 39 ;, controller.keyListener);
document.addEventListener (& # 39; keyup & # 39 ;, controller.keyListener);

function draw (timestamp) {
ctx.drawImage (bgImg, 0, 0, cWidth, cHeight);
drawPlayer ();
drawObjects ();
drawScore ();
drawDevInfo ();
rAF = requestAnimationFrame (draw);

drawPlayer () {function
if (controller.moveLeft) {
player.xVelocity - = 0.5;

if (controller.moveRight) {
player.xVelocity + = 0.5;

if (controller.moveUp && player.canJump == true) {
player.yVelocity - = 25;
player.canJump = false;


player.x + = player.xVelocity;
player.y + = player.yVelocity;
player.xVelocity * = 0.95;
player.yVelocity * = 0.95;
player.yVelocity + = 1.3;

if (player.y> cHeight-110) {
player.y = cHeight-110;
player.yVelocity = 0;
player.canJump = true;

if (player.x> cWidth || player.x <0) {
player.x = 0;
ctx.drawImage (playerImg, player.x, player.y, player.w, player.h);

function drawObjects () {

for (be i = 0; i < objects.length; i++) {
    ctx.drawImage(goombaImg, objects[i].x, objects[i].y, objects[i].w, objects[i].h);


    //var now =;

    //timeElapsed = now - startTime;

    if(objects[i].x == cWidth/2){
        x : cWidth-110,
        y : cHeight-90,
        w : 50,
        h : 50 


    function collisionDetection(i){
    if (player.x+player.w > objects[i].x && player.x < objects[i].x+objects[i].w && (player.y+player.h > objects[i].Y)) {
ctx.font = "25px Verdana";
ctx.fillText ("GAME OVER", cWidth / 2, cHeight / 2);
drawScore ();
drawDevInfo ();
cancelAnimationFrame (rAF);

else {
game.score = game.score + 1;

drawScore () {function
ctx.font = "15px Verdana";
ctx.fillText ("Score:" + game.score, 15, 20);
ctx.fillStyle = "white";

drawDevInfo () {function
ctx.font = "15px Verdana";
ctx.fillText ("@ KaushikCodeArts - 2019", cWidth / 2-15, 20);
ctx.fillStyle = "white";

//to draw();
rAF = requestAnimationFrame (draw);

networks – rsync transfer speed: same country versus another country

Does the proximity of one server to another affect the overall transfer speed in a large number of small files?

Suppose I have a server with a million small files in Germany, would it be much faster to transfer them (using rsync) to another server in Germany in front of, say, Finland? Or does it only affect latency?

Python – Game clock with configurable speed.

The intention behind this class is to allow different game systems to work at their own clock rate. The physical integration rate should not be connected to the refresh rate of the screen, for example. The creation of an instance of this class should allow accurate and independent synchronization of separate systems.

Does this code meet that requirement?

An added feature during writing was access to the object tps property, which allows changes in the rate of operation during use.

from datetime import datetime

Class ticker:

# 1,000,000; one followed by six zeros
microseconds_per_second = 1000000

def __init __ (self, tps = 1):
self.tps = tps
self._last_mark = 0
self._accumulator = 0

def tps (self):
back self._tps

@ tps.setter
def tps (self, ticks_per_second):
affirm int (ticks_per_second) == ticks_per_second
affirm 0 < ticks_per_second
        self._tps = ticks_per_second

    def last_mark(self):
        return self._last_mark

    def _microseconds_per_tick(self):
        return Ticker.microseconds_per_second / self.tps

    def tick(self):
        """Returns the number of unprocessed ticks.

        First call will initialize clock by setting first mark.
        This first call will return -1. All other calls will
        return an integer greater than or equal to zero.

        if not self.last_mark:
            # Set firt time mark and exit.
            self._last_mark =
            return -1

        # Get dt, the change in time, and update mark.
        next_mark =
        dt = next_mark - self._last_mark
        self._last_mark = next_mark

        # Increment accumulator by change in time:
        #   1) the seconds, which are converted to microseconds.
        #   2) the microseconds, which total less than one second.
        self._accumulator += (dt.seconds * Ticker.microseconds_per_second)
        self._accumulator += dt.microseconds

        # Drain full ticks from accumulator and return count.
        ticks_elapsed = 0
        while self._accumulator >= self._microseconds_per_tick:
self._accumulator - = self._microseconds_per_tick
ticks_elapsed + = 1
return ticks_elapsed

yes __name__ == & # 39; __ main __ & # 39;

ticker = ticker ()
ticker.tps = 20
# 1 initializing tick followed by enough ticks to fill 10 seconds.
for i in the range (1 + ticker.tps * 10):
yes 0 == i:
ticker.tick ()
first_tick = ticker.last_mark
while it is not ticker.tick ():
# print (".", end = "")
yes i% ticker.tps:
print ("tick:% i"% i)
print ("tick:% i  [ second %i ]"% (i, i // ticker.tps))
print ("First tick:" + str (first_tick))
print ("Final tick:" + str (ticker.last_mark))
print ("elapsed time:" + str (ticker.last_mark - first_tick))

# XXX This works well when the computer is fast enough, but the example
# will fail if the computer is too slow. I'm not sure what's going to
# happen in that case.

[WTS] Well balanced DEDICATED SERVERS + 35% discount for 3 months | Excellent uptime + free configuration!

You are interested High-end dedicated server hosting services?

CentoHost has been one of the main providers of web hosting services since 2002. We use the latest Dell server technology in our own data center to ensure our customers get the best performance from their websites. Our wide selection of web hosting services will adapt to your hosting needs, whether you are creating a small and simple website, or a high-powered, high-traffic website. Our main objective is to provide the best available technology with exceptional customer service. With a large customer base comes a wide range of web hosting requirements. We have adapted our company to these needs by providing flexible and scalable services.


Our dedicated servers are located in Own data center in Europe – Bosnia and Herzegovina. You will get access to the serial console with performance servers. You can also install and customize applications.

Our characteristics:

  • Unmetered bandwidth
  • Free DDoS protection
  • Ready for IPv6
  • Free configuration
  • Free hardware RAID
  • Quick configuration
  • Dell PowerEdge Servers
  • Guaranteed resource
  • Monitoring of the server
  • Remote reboot
  • Simple and dual CPUs

Check out Centohost Dedicated entry-level servers:
Start with a dedicated server within your budgetBandwidth without meter + Free DDoS protection + Ready for IPv6 + Free configuration)

Server Package PE-R320
Six Core Xeon E5-2420v2
Speed ​​- 6 Cores x 1.9 GHz
Memory – 16 GB DDR3
Hard drives – 2 TB (2 x 1 TB SATA3)
Bandwidth without measuring
PRICE – $ 129 / month – $ 83.85 / month – ORDER NOW

Server Package PE-R320 – 2
Six Core Xeon E5-2440
Speed ​​- 6 Cores x 2.4 GHz
Memory – 16 GB DDR3
Hard drives – 2 TB (2 x 1 TB SATA3)
Bandwidth without measuring
PRICE – $ 144 – $ 93.60 / month (3 months 35% discount) – ORDER NOW

You can also take a look at Centohost Dedicated performance servers:
More powerful servers for medium and large projects.Bandwidth without meter + Free DDoS protection + Ready for IPv6 + Free configuration)

Server Package PE R610 – 1
2 x 6 Core Xeon X5650
Speed ​​- 12 Cores x 2.7 GHz (+ HT)
Memory – 32 GB DDR3
Hard drives – 2 TB SAS (2 x 1 TB SATA) Optional
Bandwidth without measuring
PRICE – $ 243 – $ 157.95 / month (3 months 35% discount) – ORDER NOW

Server Package PE R610 – 2
2 x 6 Core Xeon X5670
Speed ​​- 12 Cores x 2.93 GHz (+ HT)
Memory – 32 GB DDR3
Hard drives – 2 TB SAS (2 x 1 TB SATA) Optional
Bandwidth without measuring
PRICE – $ 259 – $ 168.35 / month (3 months 35% discount) – ORDER NOW

Server Package PE-R710 – 3
2 x 6 Core Xeon X5670
Speed ​​- 12 Cores x 2.93 GHz (+ HT)
Memory – 32 GB DDR3
Hard drives – 2 TB SAS (2 x 1 TB SATA) Optional
Bandwidth without measuring
PRICE – $ 274 – $ 178.10 / month (3 months 35% discount) – ORDER NOW

Server Package PE-R620
2 x 8 Core Xeon E5-2670
Speed ​​- 16 Cores x 2.60 GHz (+ HT)
Memory – 64 GB DDR3
Hard drives – 2 TB SAS (2 x 1 TB SATA) Optional
Bandwidth without measuring
PRICE – $ 369 – $ 239.85 / month (3 months 35% discount) – ORDER NOW

Included with dedicated server:
Quick configuration (In most cases, our servers will be ready in just 4 hours after your order)
IPv4 and IPv6 network (All dedicated servers include IPv4 and IPv6 network addresses and connections)
Traffic without filter (All our dedicated servers come with data transfer without meter)
No configuration price (All our dedicated servers have a completely FREE configuration, even if you pay monthly)
Free DDoS protection (All dedicated servers in our offer are protected with an advanced DDoS protection system)
Free hardware RAID (We offer FREE hardware raid control with all our performance servers)

=== >> Write to us:
Centohost LLC
7260 W. Azure Dr Ste. 140-796
Las Vegas, NV 89130, United States
Phone: + 1-702-323-3802
Fax: + 1-702-323-3844

Not sure what is the best plan for you?
No problem. Send us a ticket with your questions and we will respond with a quote. Free.


Google pages speed tips

Can anyone give me some advice on my site (, how to fix my page speed score?

I use the LiteSpeed ​​Cache plugin in it, and I have enabled gzip compression, compressed css / js, lazy loading activated and other things recommended by pagespeed, GTmetrix, Pingdom.

performance: should we improve the time for the first byte or the Page Speed ​​Insights score for SEO?

There are only two page load speed metrics that really matter:

  • Time until the delivery of the HTML page (without assets such as images, CSS and JS)
  • Time until the first content screen is loaded and usable.

The delivery time of HTML is important because it is the factor that Googlebot sees most directly. Control how quickly Googlebot can crawl your site. The algorithmic ranking penalties applied by Google are almost all based on this metric.

The time until the page is usable is important for users. Users move away from a site that can not be used quickly. This has indirect consequences of SEO because Google warns when users are not satisfied with a site.

So, how fast should your site be?

  • Google will actively penalize sites where the HTML page is not delivered in 7 seconds.
  • Users start to move away from a site that can not be used in 3 seconds.

So concentrate on the users. They are much more demanding than Google. You have three seconds That breaks down into:

  • 1 second to receive your HTML page delivered.
  • 1 second to download CSS, JS and critical image resources.
  • 1 second to allow the browser to render the page.

Since TTFB is a component of HTML page delivery, you must optimize it to be a part of the first second assigned for HTML delivery. Lower it to 200 to 500 ms.

All the resources that are not necessary for the page to start working should be loaded lazily. Most JavaScript must be loaded asynchronously. The images below the fold must have their deferred load.

With this in mind, the PageSpeed ​​Insights score can be completely ignored. I do not think Google uses this score directly in the rankings. The tool and the score can be useful. It can tell you what optimizations might be available to you. It may be possible to help you prioritize what optimizations to perform. However, it is a mistake to pay attention to the score only. Instead, focus on making the site fast for users as your main goal.

Also keep in mind that items that are out of your control will affect your PageSpeed ​​Insights score. I have a site that fully loads your pages in 1.2 seconds and gets 100 for your score. However, when I enable AdSense on the page, PageSpeed ​​insights reports that the full load takes 10 seconds and the score is reduced to 63. This is despite the fact that the base page is fully usable after 1.2 seconds and the Ads are slowly loading later. .

processor – phone operating speed during charging

I have noticed that when my phone is charging, it is running noticeably faster than when it is running with the battery, the frames are softer, etc. Is there a way to force the operation of the phone as if it were charging? I think this could be related to processor speed, but I could not find any option in the developer's configuration