79

Chrome Opening the “Console” panel of Chrome’s DevTools: Windows and Linux: Ctrl + Shift + J Mac OS: Cmd + Opt + J Note: In addition to the “Console” panel, there also exists a smaller slide-up console which can be toggled via Esc while any of the other panels is active. Full documentation Firefox Opening the “Console” panel in Firefox’s Developer ...


31

On my currency conversion site, the majority of sessions are single page views. This is because users can do their currency calculation directly on the landing page (all the calculation is handled client side with JavaScript.) My page downloads and renders in about half the time when all resources (css, js, and even images) are inline in the page. ...


29

CloudFlare describes Rocket Loader like this... Rocket Loader is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload. Rocket Loader does a bunch of things: It ensures that all the scripts on your page will not block the content of your ...


15

Inline JavaScript increases download times for the page, which is not good. With a call to a .js file, at least these can be parallel calls and content download times decreased. Yes there are times where it is okay to put JavaScript directly in the HTML code, but you are often better off off-loading this as much as possible. Keep in mind that page download ...


13

Google now officially processes JavaScript. In order to solve this problem, we decided to try to understand pages by executing JavaScript. It’s hard to do that at the scale of the current web, but we decided that it’s worth it. We have been gradually improving how we do this for some time. In the past few months, our indexing system has been rendering a ...


13

It's not necessarily bad to have JavaScript within your HTML file but you must make a judgement call on it. It is bad if you have a large amount of JavaScript being used across multiple pages. In that case, the JavaScript should be in an external, compressed, and cachable file and if your site has very heavy traffic you should make use of a CDN. However, ...


11

I've never seen image lazy loading have any negative impact on web search rankings. Improving the perceived performance of your site for users can really help your rankings. When fewer people bounce back to the search results because of performance problems with your site, your rankings will improve. Google will not be able to index lazy loaded images for ...


11

From the info I found through this question on SO I guess that between 0.2 and 2% of users have JavaScript disabled, depending on the country. I'd say take 1% as a rule of thumb. Whether you should care about this 1% depends on what website your building. If you're doing e-commerce and you have analyzed your audience a bit you can probably estimate if that ...


10

robots.txt can block JavaScript files from Googlebot. http://www.robotstxt.org/ has more information about how to construct a robots.txt file. You could put your JavaScript that shows the password into an external JavaScript file (called showlists.js): $(document).ready(function(){ showLists(); }); Call that JavaScript file in the page head: <...


8

This will not hurt you. Having your site do different things depending on environmental factors (such as the type of device) is common and ok to do. You only have an issue when you intentionally serve different content to search engines than to users and that clearly is not the case here.


8

Google changes this around every now and then, and whenever they do I have to 're-find' where each of the settings are. So you're not alone! You're right that a browser key is essentially 'public' and should be limited by domain to protect it from being stolen. It's worth noting the worst that can happen if its stolen is that someone could use up your free ...


8

Can I just send pre-rendered HTML, using phantomjs or other headless browser, to the google bot? In short... no you shouldn't. Google's stance on differing versions for visitors and search bots is clear and regardless of your intentions it is classed as a cloak. Google also goes to great lengths to activity look for sites that specifically treat the ...


7

Yes. By the HTTP protocol, clause 7.2.1: “Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI ...


7

From Modernizr installation page: Drop the script tags in the HEAD of your HTML. For best performance, you should have them follow after your stylesheet references. The reason we recommend placing Modernizr in the head is two-fold: the HTML5 Shiv (that enables HTML5 elements in IE) must execute before the BODY, and if you’re using any of the CSS classes ...


7

Java != Javascript Javascript is a scripting language supported by the overwhelming majority if interactive browsers. Note that I said Interactive browsers - most bots will have extremely limited - if any - support for Javascript Java is a (semi-compiled) programming language which is largely cross platform but requires additional software to run.


6

Use custom dimensions in Google Analytics. First, navigate to the "admin" section of Google Analytics' web portal, click "Custom Definitions", then "Custom Dimensions" under the property you're selecting. Click "new custom dimension", give the dimension a name, and save it as type "hit". Now add code similar to the following: ga('create', 'UA-XXXXX-Y', '...


6

When I try to get a particular image on a remote domain via JavaScript I get a 403 error. Likely answer: The site in question has protection against "leeching" / hotlinking. i.e. It checks to see what host is requesting the file before serving it. If the request comes from an unrecognised website, they throw a 403 Forbidden error. If you take a look at ...


6

Never treat Googlebot any different than your real users Google's bots that visit your site should be treated just as any other user and therefor attempting to hide content can actually harm your website. Google treats hiding of content as cloaking and is against their rules and if detected you can expect a heavy slap. Many websites have popups on visit ...


6

No. Google may sometimes execute Javascript to determine content, but it's a very bad idea to rely on Javascript for your site to be crawled as you want it to be.


6

Googlebot now renders pages and views the page as a user sees it when it loads, including applying CSS and running JavaScript. Google will detect text that is hidden using either CSS or JavaScript. Google will penalize a site for hiding keyword rich text that cannot be viewed by users. They call the practice cloaking: showing content to search engine ...


6

You can't hide h1 and h2 tags (or any text for that matter) and still have them apply positively to SEO. For several years now, Google has been trying to index precisely what the user sees. Google is able to intelligently process CSS and now JavaScript to achieve this goal. If the user doesn't see it then there is no point it being indexed. Delivering ...


6

Those are not links so they aren't counted as such. They're URLs of resources which are very different things. Hosting such a resource offers no direct SEO value but being known as a reliable host can encourage other sites to link to you as such.


6

you can leave the global site tag tracking code snippet on your site, just do not also configure tags for GA pageview tracking within GTM. If it were me, I would remove the global site tag tracking code snippet and configure tags for GA tracking within the google tag manager container. Bit of extra information: Both Tag Manager and gtag.js perform ...


5

JavaScript Use a JavaScript code coverage tool such as JSCover. It returns a coverage chart like this one showing what percentage of functions in each linked JavaScript file are used. CSS Download the site and recreate it locally, then use a CSS scanning tool such as Helium. It requires a line-separated list of URLs to parse.


5

A search engine will examine the HTML you provide at the start. Anything after that will be ignored. However, Google has said they now do some rudimentary examination of script. Whether they consider altered HTML in that examination, we won't know. So, any HTML you add or change after the initial download will probably be ignored. Whether you consider that ...


5

I'm a Yii developer and I can tell you, that Yii has nothing to do with this. It is completely on developer side, whether he or she put Javascript code to a separate file and register it with HTML (view) page with CClientScript::registerScriptFile method or put it directly to view (HTML) code and register it using CClientScript::registerScript method. As ...


5

Google's Adsense policy does not touch upon Crypto Currency Browser miners directly but it is clear that either malware or anything else that interferes with site navigation is considered a breach of their terms of use, therefore webminer scripts are likely to breach their terms of use policy. Site behaviour Sites showing Google ads should be easy ...


5

Google doesn't care about the name of the tags in your body section - the crawler renders the site using chrome itself (including synchronous js) so it cares for whatever is printed to the screen. You're safe as long as your tags in the head are standard. It is just safer to have SSR to reduce possible errors (timeouts, things that appear only on ...


5

Yes, the article is not quite complete. Any trigger has to be matched with a tag, in this case a Universal Analytics Event tracking tag (I do not believe there is another appropriate way to send it). Ours had the following values: Category: JavaScript Error Action: {{Error Message}} Label: {{Error Line}}: {{Error URL}} I say "had" because we have ...


5

You need to add your Google Tag Manager code in your website. Then, you have two options: Leave it, don't do anything else. Your Google Analytics code will remain as it is and FB Pixel will be added via Google Tag Manager. Alternatively, you can remove the code for Google Analytics from your website and add a tag in Google Tag Manager https://support....


Only top voted, non community-wiki answers of a minimum length are eligible