chevron_rightAd Tags
chevron_rightHTML5 Ads
chevron_rightVAST Tags
chevron_rightVideo Ads
Ad Load Size Detector
Initial Load Detector
Host-initiated Subload Detector
Network Requests Detector
CPU Usage Tester
DOMContentLoaded Detector
Ad Size Validator
Has Video Detector
Memory Usage Detector
SSL-Compatibility Detector
Iframe Count Detector
Cookies Dropped Detector
Chrome Heavy Ad Intervention Detector
JavaScript Error Detector
Console Warning Detector
Mobile Friendly Tester
Creative Rendered Detector
Blocked by AdBlock Detector
Document.write() Detector
Creative Border Detector
Ad Server Vendor Detector
Missing Asset Detector
Dialog and Modal Detector
Measurement Pixels Detector
Local Storage Detector
HTML Syntax Error Detector
Ad Tag Landing Page Checker
Meta ad.size Detector
Click Tag Detector
CSS/JS Minified Detector
Image Optimization Detector
External Asset Detector
Uses jQuery Detector
HTML5 Library Detector
Hosted File Size Detector
HTML5 Allowed File Type Detector
Ad Load Size Detector
Initial Load Detector
Host-initiated Subload Detector
Network Requests Detector
CPU Usage Tester
DOMContentLoaded Detector
Ad Size Validator
Has Video Detector
Memory Usage Detector
SSL-Compatibility Detector
Iframe Count Detector
Cookies Dropped Detector
Chrome Heavy Ad Intervention Detector
JavaScript Error Detector
Console Warning Detector
Creative Rendered Detector
Blocked by AdBlock Detector
Document.write() Detector
Creative Border Detector
Missing Asset Detector
Dialog and Modal Detector
Measurement Pixels Detector
Local Storage Detector
HTML Syntax Error Detector
VAST Ad System Detector
VAST CORS Header Detector
VAST Creative Count Detector
VAST SSL-Compatibility Tester
VAST Version Detector
VAST Wrapper Redirect Detector
VAST XML Content-Type Detector
VAST XML Load Time Detector
VAST HTTP Code Detector
VAST XML File Size Detector
VAST Impression Logging Detector
VAST Audio Channels Detector
VAST Audio Compression Detector
VAST Audio Sample Rate Detector
VAST Audio Codec Detector
VAST Audio Loudness Detector
VAST True Peak Detector
VAST Audio Bit Rate Detector
VAST Video Aspect Ratio Detector
VAST Video Dimensions Detector
VAST Video Duration Detector
VAST Video Bit Rate Detector
VAST Video Bit Rate Mode Detector
VAST Video Chroma Subsampling Detector
VAST Video Color Space Detector
VAST Video Frame Rate Detector
VAST Video File Size Detector
VAST Video Container Detector
VAST Video File Extension Detector
VAST Video Codec Detector
VAST MOOV Atom Location Detector
VAST Delivery Type Detector
VAST Skip Offset Detector
VAST Video Mime-Type Detector
Video Codec Detector
Aspect Ratio Detector
Video Dimension Detector
Video Frame Rate Detector
MOOV Atom Position Detector
Video Color Space Detector
Video Chroma Subsampling Detector
Audio Codec Detector
Audio Loudness Detector (LUFS)
Audio True Peak Detector
Audio Sample Rate Detector
Audio Channel Detector
Audio Compression Detector
Audio Bit Rate Detector
Video Container Format Detector
Video Bit Rate Detector
Bit Rate Mode Detector
File Size Detector
File Extension Detector
Video Duration Detector
Video Mime Type Detector
document_scanner
Ad Tag Tester
CPU/RAM usage, Dimensions, SSL...
document_scanner
HTML5 Ad Validator
Initial Load, Click Tags, Meta ad.size...
document_scanner
VAST Validator
Audio Loudness, Video Codecs, Dimensions...
document_scanner
Video Validator
MOOV Atoms, Audio Loudness, Bit Rates...
headset
Live Chat Online
Get instant answers to your questions
email
Contact Support
Reach out to see how AdValify can help
cloud
Network Status
See live network status updates
emoji_events
Customer Testimonials
Read what others have to say about AdValify
auto_stories
User Guide
Get started with AdValify in seconds
document_scanner
Creative QA Tests
CPU/RAM usage, Initial Load, SSL, etc.
emoji_events
Customer Testimonials
Read what others have to say about AdValify
api
API: Ad Tag Tester
API docs to validate ad tags
api
API: HTML5 Ad Validator
API docs to validate HTML5 ads
api
API: VAST Validator
API docs to validate VAST ads
open_in_new
GitHub PHP Class
PHP Ad Validator Class
public
Network Status
Live infrastructure status
AdValify.io Logo
AdValify
Automated Ad Validation
 
Share with
your colleagues!

How to check memory usage of ads?

Written by Roy
Apr 5, 2022 • 4 min read

Heavy ads can be a real pain for publishers. High RAM usage of third-party ads can slow down your page, especially on mobile phones where RAM is often limited.

Nested iframes, each having their own DOM, are usually the cause for a high memory footprint. Ad verification vendors and other forth-parties are all add their own logic which consumes memory.

So how can you detect the amount of RAM used by a single ad?

You can load the tag on a test page, and use Chrome Dev Tools to measure the RAM usage. It's a time-consuming task and not scalable if you have thousands of ads to check.

Let's use an API to detect RAM usage

Wouldn't it be great to automate the whole process? Use the APIs from AdValify.io to automatically scan ad tags and measure memory usage.

Here's how to do that using PHP.

First, download this PHP class from Github:
https://github.com/AdValify/ad-validator-php

Then, run these lines of code:

include("AdValify.php");
$AdValify = new AdValify();
$array = $AdValify->scanTag("This is an ad tag...");
$memory_usage = $array['memory_usage']; //int, in bytes

Once you have that int variable, you can use it further down in your logic. For example, if the ad uses more than 10MB of RAM, prevent it from being activated. Check out the complete API Documentation for a list of all data points collected by the scanner.

Integrate AdValify's APIs into your product

APIs are fast, scalable and allows you to automate the whole creative quality assurance process. You can litterally scan thousands of ads and measure RAM usage.

Here's how AdGlare (an ad server for publishers) uses the APIs of AdValify.io to detect issues of newly added creatives.

adglare-quality-score.png

Are you a publisher or working in AdOps? Speak with your ad server vendor to implement the APIs into their product too. You can find the complete API documentation here.

Scan ads online to check RAM usage

No time to set up the API? Use this free online ad tag tester to scan ads. It will give you lots of information, like CPU usage, cookies dropped, load size and SSL-compliancy. Great time-saver!

Free Ad Tag Tester Online

Want to try AdValify's QA scanners for free?

If you're looking for a quick way to measure RAM memory usage of ads, check out our tools. You'll have the results in < 30 seconds.

Conclusion

Checking RAM usage of creatives and ad tags can be time-consuming. Online scanners make your life a bit easier by analyzing the ad in seconds. If you want to take it a step further, APIs are a powerful tool to automate and scale RAM usage detection of ads.

External Resources

More from AdValify.io