How to find which file is serving ads in my application? - angularjs

Ok, somehow I am serving ads in my NodeJS / AngularJS application, but I haven't include this myself.
There's some package or included link sending ads to the client, but the ads are not visible, and the adserve url changes with every request. (The url that can be seen in the screenshot below)
How do I find out which place in my application serves these ads?
PS: I am sure this doesn't come from my local dev pc, my other collegues have this issue as well.

A quick trick may be to search for the url in every files of your repository. If you use a cdn to load your librairies, try to look inside also (you can do that directly in chrome dev tool with ctrl/cmd f in the sources tab).
Hope it will help !

The "adserver" in my project turns out to be a tracking / analytics beacon included by the Realtime.co framework.
Thankfully, the author responded to my email very quickly, and they also provide a beacon-free version of their framework. So problem solved :)

Related

appengine randomly serves old files

I'm currently using Google Appengine to host a website with Golang as the backend. I have a custom domain setup and (sometimes) it works perfectly fine. My website requires some css and js files from the server. These were served perfectly in the past but now it randomly stops working. Both on the "mydomain.de" and on the "myapp.appspot.com" domains. Sometimes it works on the normal domain and then it works on the other and sometimes even on both. But if I reload the site after a couple of minutes it just shows me an old index.html file (that I have removed days ago).
Did someone experience this problem in the past and does anyone know a fix for this?
Thanks in advance.
Have you ruled out your browser cache as the source of the problem? If after getting a stale version, shift-reload (assuming Chrome or Firefox) brings up the desired version, then look into how to do "cache busting" for css and js, and check the app.yaml doc for how to set expiration times on static assets (assuming your index.html is static).

How do I make selenium see the network requests made by a web browser?

I have a dotnet Selenium web driver app.
When I'm testing the page one of the things I need to confirm is that a flash object on the page has pulled correct content from a content store on my site. (i.e. the flash object should be loading content from /stuff/info.txt and including that content within the animation.)
As a human looking at this I can use the chrome network tab and see that /stuff/info.txt has been accessed.
How can I make Selenium execute a similar watch and see the network requests made by a web browser?
I did not wrote this, neither tested it however someone did it here: http://www.softwareishard.com/blog/firebug/automate-page-load-performance-testing-with-firebug-and-selenium/
Basically all the requests are exported via netexport and firebug plugins inside a HAR (Http ARchive file)
Please give us your feedback if you give it a try!
Cheers !
I assume you want to automate the process which the developer tools of browsers does. Something like firebug but for verification using Code.
I don't believe Selenium has such features. For now, you will not be able to achieve this.

How do I stop Angular from loading the .angular.min.js.map file when pulling Angular from a CDN?

I am working on a website which loads AngularJS from a CDN, and along with Angular it loads a 284KB map file (angular.min.js.map), which I understand is for debugging.
I don't want to debug, this is going into production, and 284KB is a lot! How do I stop this file from loading?
I can't edit the file (CDN), and it doesn't matter what my Google Chrome options are, I can't advise others to change their settings to use the website I am working on.
Thanks
According to http://blog.teamtreehouse.com/introduction-source-maps
The developer tools will only load this file if support for source maps is enabled and the developer tools are open.
So any impact will only be felt if someone opens their developers tools, which I suspect is acceptable, as in that case ability to debug it more important than download speed/size.
Within Google Chrome's inspector, have you unticked 'Enable JavaScript source maps' in Settings > General?
I think your dev setup is trying to pull the source map file in regardless, for others without this option ticked in Chrome's inspector it won't be a problem.
Don't worry about the source map files for production.
Only if a user has chrome dev tools or other source map compatible browser tools running will they request and download the source map file/s.

Pagespeed on app engine.. lots of issues. am i missing something?.. [php, appengine]

recently we deployed our site to google app engine and everything deployed successfully.
now we enable pagespeed in settings.
now problem.
its making loading css in html head section with some wried script tag instead of style tag..
i tried every and many confirmation settings but nothing works..
i want to load google fonts css early in html (not working, for now disable filters related to css because of issue 1)
i want it to combine all my js to one file and compress it. (not working)
here is page speed configuration in yaml.
pagespeed:
enabled_rewriters:
- ConvertMetaTags
- ElideAttributes
- CollapseWhitespace
- CombineJs
- ProxyCss
- InlineCss
- MinifyCss
- RemoveComments
disabled_rewriters:
- FlushSubresources
- WebpOptimization
- InlineImages
- ImageStripColorProfile
- ProxyImages
- ProxyJs
- ImageRecompressPng
- ImageProgressiveJpeg
- ImageConvertToJpeg
- DeferJs
- MoveCssToHead
- InlineJs
- InlinePreviewImages
here is website www.justtotaltech.co.uk
and sometime its load css in html after refreshing page one or two times..
is there any to configure more advance settings of pagespeed in app.yaml or somewhere else like pagespeed service and mod_pagespeed
or is there any way to use external pagespeed service for appengine instead of one inbuit with it. (i tried this but it don't fetch content from origin domain (app engine))
someone said in below comments for removing pagespeed section and now site don't have it. but nothing work at all.
for the issue 3. I contacted pagespeed team for related issue previously and got the following response.
CombineJs AND CombineCss are disabled automatically whenever FlushSubresources is enabled. this option is currently enabled by default.
So disable FlushSubresources first then combinJs rewriter will work.
Another thing worth to say is that you can actually preview the pagespeed results.
For example:
view-source:http://www.justtotaltech.co.uk/services/software-development/?ModPagespeedFilters=combine_javascript,combine_css
It will be much easier to detect which filter cause the issue.
Workable Page Speed Config
pagespeed:
enabled_rewriters:
- MinifyCss
- CombineJs
- CombineCss
disabled_rewriters:
- FlushSubresources
Great question, as I am experiencing similar issues. I wanted to start by referring you to the google developer document page (which I am sure you have looked at):
https://developers.google.com/appengine/docs/python/config/appconfig
As they note there, "App Engine's support for PageSpeed is an experimental, innovative, and rapidly changing new feature for Google App Engine. Unfortunately, being on the bleeding edge means that we may make backwards-incompatible changes to App Engine's support for PageSpeed. We will inform the community when this feature is no longer experimental."
Thus, I am not surprised to hear you experienced performance changes that were somewhat arbitrary. Paraphrasing from the developer docs, I see the following in terms of testing (as that is what I am trying to do for a custom application as well). To work through things, you might try to be very deliberate and try different test configurations (which I assume that you have already). That, said, if you haven't, and you want to try a new configuration, perhaps to test some "risky" optimizations, you might expect that you could do so in a test Application Version while your users continue to use the default Application Version. Unfortunately, since updating the test version's configuration applies to all versions, the "risky" settings are applied to the version that your users use, too. Instead, to try out these settings, you could:
Turn off PageSpeed for your application, update PageSpeed configuration, and view your site using the PageSpeed chrome extension
Copy the relevant parts of your application to a separate test application that has its own application ID and versions.
If you do find any specific solutions to the issue, please post them here!

MediaWiki 1.19.0 styles and skins not displaying

As the title of my question states I am having trouble with my MediaWiki 1.19.0.
I'm running apache2 and I have a few sites that are working fine. I downloaded and installed MediaWiki 1.19.0 and so far it works fine.
But if I try viewing my wiki page from another computer or over the internet the styles and skins don't display.
Any help would be appreciated.
You need to yet yourself Firebug and find out with it which styles/scripts HTTP requests are failing.
I was having this exact same problem. The load.php entry was not being created in the conf.d/mediawiki119.conf file. It also wasn't creating the symlink from /var/www/mediawiki119/load.php to /user/share/mediawiki119/load.php.
Once you fix those two things it will work.
load.php was a new feature that loads the skins which is probably why they forgot it in some of the configuration files.

Resources