I'm optimising website and through the checkup it was suggested to leverage browser caching for following links.
https://www.googletagmanager.com/gtag/js?id=UA-40514212-1 (15 minutes)
https://connect.facebook.net/sk_SK/sdk.js (20 minutes)
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (60
minutes) https://www.google-analytics.com/analytics.js (2 hours)
How do I do that and where?
Related
I have a Perl script which uses LWP::UserAgent to retrieve a YouTube video's information via an HTTPS request. The script normally would take 2-3 seconds to retrieve three separate HTTPS requests. Now, it takes 15-20 minutes.
I wrote a similar script in Python where I use the following:
import google_auth_oauthlib.flow
import googleapiclient.discovery
import googleapiclient.errors
And this one request is taking 5-7 minutes.
Then - on Thursday night - the Perl script went back to only taking 2-3 seconds. This lasted for a few hours, and now the time is back to taking 15-20 minutes. The script seems to take forever on the HTTPS call - and not during any other time of the script.
If I take the HTTPS URL and put it in a web browser, it takes less than a second.
The script is over 2,000 lines long, so I can't post it here. But, all I am doing is trying to retrieve:
https://www.googleapis.com/youtube/v3/videos?part=statistics&key=$key&id=$video_comments_to_get,
where $key is my authorization key, and $video_comments_to_get is the 11 character YouTube video ID value.
This all started after YouTube's outage on November 11th. Any ideas why this would be taking so long? I only run this script 10-15 times a day - so it isn't like I am over my quota.
we are trying to figure out with my friend why we are have all the time over 15s idle time on load as you can see in screenshot
We are using Joomla version 3.5.1 and Land Box theme. Any idea why we have such a huge idle time on loading?
Here's a webpage test view of the same page.
There's a 10sec wait until until the first byte, my first suspicion for this is that the server may be overloaded.
Then there's close to another 10 seconds until the page is loaded, and the reason for this is the large number of files -- about 100 in total (40 JS files, 37 images, and 40 CSS and others)
Hope this helps!
In Parse's pricing FAQ it is mentioned that "If your app hits its request limit, your extra requests will begin to fail with error code 155 (RequestLimitExceeded)".
What does (extra requests) mean?
Are they the requests made within the same minute? day? month? or all other requests made until the request limit is increased?
From the Parse.com FAQs:
The request limit is calculated on a per-minute basis. For example, if
an app is set to 30 requests/second, your app will hit its request
limit once it makes more than 1,800 requests over a 60 second period.
If your app hits its request limit, your extra requests will begin to
fail with error code 155 (RequestLimitExceeded). To prevent the
requests from failing you should adjust the request limit slider for
the relevant app on the Account Overview page. Please note that you
can see your actual requests/second on the Performance Analytics tab.
Your plan supports a certain number of requests per second. Extra requests are all requests that are started after the limit defined by your plan has already been reached. As outlined above, it is calculated on a per-minute basis: if more than 60 * your rate per second requests are made with your API key per minute, some of them will be extra requests and fail.
The FAQ entry actually contains an example: If your plan allows for 30 requests to be made per second, every minute 60 * 30 = 1800 requests are allowed. After the minute has passed, the counter will be reset.
I can't seem to get the Yammer API to allow more then 5 Requests / Minute. So i have put 6 seconds delay in each request.
But the API page says I should be able to get:
API calls are subject to rate limiting. Exceeding any rate limits will result in all endpoints returning a status code of 429 (Too Many Requests). Rate limits are per user per app. There are four rate limits:
Autocomplete: 10 requests in 10 seconds.
Messages: 10 requests in 30 seconds.
Notifications: 10 requests in 30 seconds.
All Other Resources: 10 requests in 10 seconds.
We found a bug in the api_messages_controller that was doubling the request count because of a before filter. A fix went out so you should be good now.
I want to keep sessions alive for an extended period of time for peoples shopping carts, and was wondering if its a good idea to do so by setting the session_time_to_update variable in the config file to the desired time (i.e. 6 months).
I changed it to 7200 seconds at the moment and can see that I am still logged in after 5 minutes (it was 300 seconds by default).