Questions tagged [javascript]

JavaScript is a dialect of the standardized ECMAScript programming language, primarily used for scripting web-pages. Use this tag for questions regarding ECMAScript and its dialects/ implementations: JavaScript, JScript, etc., excluding ActionScript.

Filter by
Sorted by
Tagged with
4
votes
2answers
4k views

Javascript - Detect if user is coming from a Google Adwords ad

Is it possible to detect if my visitors are coming to my website via a Google Adwords Ad? It would like to change the telephone number for those users only, that way I can measure the success of my ...
4
votes
1answer
5k views

Dictionary API for a website?

I would like to have a dictionary for my website where the user can easily fill in a word or better yet right click a word and get the definition right there on the page or something along those lines....
4
votes
2answers
237 views

Adding Google +1 Button Slows Page Load Time

This article says Google +1 tags can add a second to page load time, which means a 10% decline in visitors. The article authors say they use smart tag loading to reduce page load time. Does anyone ...
4
votes
2answers
2k views

One JS/CSS bundle Vs. One with default and one with custom

On a few of my sites, we use Javascript/CSS bundles to reduce load time. I've always used two bundles for each type (4 in total) so I have JS Bundle 1: Contains scripts that are standard on every ...
4
votes
3answers
2k views

Is there a Magento extension for combining/compressing javascript and css?

I thought Magento came with this feature out of the box but it doesn't appear to be working at all. I'm not sure if I haven't set it up properly, but right now I'm resorting to using cat and altering ...
4
votes
1answer
806 views

How to hide a JavaScript popup for Googlebot?

I want to display a JavaScript popup when visitors access my website, however I believe Google will decrease my rankings when they detect a popup. So, is there any way to hide a JavaScript popup for ...
4
votes
1answer
62 views

When is “async” useful for loading scripts into a web page?

If an external script defines functions referred to in the HTML (e.g. onclick=...), the script should be located in the <head> so that it will be downloaded immediately to make the functions ...
4
votes
4answers
330 views

Google showing dynamic page title set by JavaScript rather than the static title embedded in the HTML

On my website the title is initially set through the title tag in the html served by my server. It is then changed to its dynamic equivalent through JavaScript. I want Google to show my website's ...
4
votes
1answer
603 views

Separate URLs on tabbed content - good or bad for SEO?

I am building a site that lists shops. Each shop page has two tabs: shop info and reviews. It's one page, with jQuery hiding/showing the right portion of the content. From a purely SEO point of view, ...
4
votes
2answers
2k views

Does Bing execute Javascript when crawling and indexing web pages (like Google)?

Some content on some web pages is only displayed with Javascript when a button is clicked (for example). We know that Google executes Javascript and is (very likely) to find this content, but what ...
4
votes
2answers
450 views

How can I get Google to index content that is written into the page with JavaScript?

I have a website that focuses on charts and graphs. The graphs on the site are drawn using JavaScript, but contain keywords that I would like to have indexed. For example, here is a screenshot of ...
4
votes
1answer
151 views

New to website form validation

I'm new to form validation and I have been lucky over the years. I would like to update my method of form creation in my sites. I was curious to know what is standard and if there is a preexisting ...
4
votes
2answers
1k views

Pagespeed Insights reports that Google Analytics is blocking main thread in page load

I'm chasing page speed, partly as proof that getting 90%+ is consistently achievable. My main issue now is Google Analytics. In the below example, it's loaded via Google Tag Manager, so there's just ...
4
votes
2answers
1k views

Rewrite all URLs within subdirectory to index.html so JavaScript can use the path

I have a part of domain example.com/~mypart. In that folder is index.html. If I visit example.com/~mypart/something I get a "Not Found" error. I want every address with some string after example.com/...
4
votes
1answer
683 views

Bing + React: Inconsistent indexing

I have a page written in React.js, the whole content (including meta tags) is rendered using javascript. Google indexing works flawlessly for these pages, but Bing is inconsistent. Title some used ...
4
votes
2answers
112 views

Adsense ads don't appear even if account approved

I have a website that runs on Apache 2 and has code in PHP and JS + HTML. This is the code of my ad unit: I have an approved AdSense account that already was showing (and getting revenue) from AdMob ...
4
votes
2answers
1k views

Will AggregateRating markup that is generated dynamically by client side JavaScript show stars on Google search?

Google show stars in Google search with JavaScript dynamically generated rich snippets? I'm thinking about starting a widget that my users will put in their website. My widget will generate rich ...
4
votes
2answers
241 views

Is making AJAX site crawlable AND degrading gracefully with JS turned off possible?

According to this spec, making AJAX site crawlable by Googlebot means that you have to use hashbang (#!) links in it which means it won't degrade gracefully when JS is turned off. This might mean that ...
4
votes
3answers
218 views

Is there an elegant way to track multiple domains under separate accounts with Google Analytics?

I have a situation where a content management system uses the same template for multiple websites with different domain names and I can't make a separate template for each. However, each website needs ...
4
votes
2answers
70 views

Abandoment to blame for the last JavaScript file not always being loaded?

I have a code snippet for an app that users are loading as a 3rd party script on their site. The general sequence is as follows: Site loads http://www.example.com/foo.js foo.js does stuff 1 to 2 ...
4
votes
1answer
275 views

Creating a “presentable”/filtered twitter profile widget

I would like to include a subset of tweets I make on my professional web development site. Now, twitter provides two applicable widgets: a profile widget and a search widget Unfortunately, the ...
4
votes
1answer
582 views

Dynamic content using .append() or .innerHTML() and SEO

I was looking for some clarification on something I am looking to implement, I would like to know how a Google Crawl will see this and if it would be detrimental to SEO. On my webpage I have an empty ...
4
votes
1answer
445 views

Does Googlebot execute Google Tag Manager?

I wanted to understand how Googlebot (and other crawlers) crawls my site. Specifically whether it passes a document.referrer and if it maintains localStorage keys, so I implemented a script via Google ...
4
votes
2answers
798 views

Workaround for appearing to change the URL of an infinite scrolling page when pushState is not available due to analytics

I'm building a website and they want it to be an infinite scroll single page design, and to be as SEO friendly as possible. Just to give you an example: Here is an example URL structure: com ...
4
votes
1answer
1k views

How to inform Crawler on AngularJS permanently moved page without losing SEO ranking

I am using Angular JS app and serving snapshots for crawlers when they visit. Changes are inevitable and hence certain pages are to be moved permanently (Redirect 301). For example: www.domain.com/#!...
4
votes
1answer
335 views

How to avoid html tags in Google search summary

I am using CKEditor to let people describe their organization with all the styles and fonts. So when it saves in the database its like < gets saved as &gt and rest all you know for the html ...
4
votes
1answer
1k views

AngularJS SEO for static webpages (S3 CDN)

I've been looking into ways to improve SEO for angularJS apps that are hosted on a CDN like Amazon S3 (i.e. simple storage with no backend). Most of the solutions out there, PhantomJS, prerender.io, ...
4
votes
1answer
175 views

Tracking dynamic events in Google Analytics?

I'm trying to implement dynamic events in my platform to trackearlos. My question is: For generating these events and who are trackeados in Google Analytics to put the push of the "onclick" to do ...
4
votes
1answer
423 views

What is the best way to optimise a site with lots of images for a Retina display?

I am going to have a website which will deal with a lot of images. What is the best way to optimise them for Retina display without having much of an impact on website loading times? There seems to ...
4
votes
2answers
471 views

<!--hppage status=“protected”--> Bad for SEO?

I've just come across this protection code: <!--hppage status="protected"--> It hides the html and page code from anyone who wants to right click and view source. I can't see a work around to ...
4
votes
5answers
2k views

JavaScript to stream video files

Is there a JavaScript API for streaming WMV/AVI/MOV files?
4
votes
2answers
2k views

Embedding a Disqus forum on my website: showing scrollable area instead of expanding the height

I hope I put this question as it should, I am not an expert in html/css/javascript, so forgive me if it's not very clear. The issue is as follows. I made my first website last week for the birth of ...
4
votes
1answer
3k views

Forbidden 403 error on Google AdSense requests

I have created a new website and have set some ads. For some unknown reason, FireBug tells me that I get 403 errors on Google Adsense requests. I have checked my AdSense account and it does not block ...
3
votes
2answers
1k views

How to disallow selection of text on website?

I have a question about preventing the selection of content and right-clicking with your mouse on a website. Some websites that I have encountered display a dialog which prohibits right-clicking but ...
3
votes
3answers
850 views

Importance of 'href' attribute within an <a>

I am aware of the 'content is king' seo rule, but I'm also wondering whether empty <a> HTML elements is a relatively big downside regarding SEO. To be more precise and actually cut to the chase,...
3
votes
4answers
871 views

Advantages/disadvantages of “separated” web applications

I'm in the process of designing a (soon-to-be) rather large PHP/MySQL web application. I've come to a fork in the road as far as internal architecture; I can build the website as a "traditional" web ...
3
votes
2answers
234 views

Do I need to add the Google Tag Manager if I already have Google Analytics?

I have google analytics in my website like this : <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-1"></...
3
votes
7answers
2k views

Space in img:s “ALT” attribute good/bad for search engines?

I am trying to make it easier for search engines to crawl my website, as it is almost 100% dynamic. I have a couple of transparent images which are actually links to sections of my page. I wonder, ...
3
votes
3answers
797 views

is there any webpage preloader?

I found preloader for flash|swf files, a preloader and a lazy loader for images. But nothing for the complete webpage. Some sites, like mine, have big header and footer. I need some preloader for ...
3
votes
2answers
2k views

403 Error Fetching Image with JS

I've read all the 403-related questions here and elsewhere and I can't find an answer to this question: When I try to get a particular image on a remote domain via JavaScript I get a 403 error. But ...
3
votes
2answers
522 views

Is traditional JavaScript image pre-loading taboo

I remember the good-old-days (not really) back when I was still sucking the teet of Dreamweaver to build websites and the lure of playing copypasta with fancy built-in scripts (ex, image-swap) was ...
3
votes
2answers
418 views

Does Google count external Javascript or CSS files as backlinks?

Is there any information available on whether search engines (Google) count external Javascript or CSS files as backlinks? Example: Does loading FontAwesome from their CDN count as a backlink for ...
3
votes
2answers
619 views

Node.js - Is there any front-end js? Or is it all backend?

With Node.JS as a backend solution; is there any frontend javascript or all events controlled on the backend?
3
votes
2answers
240 views

Does Google Analytics allow custom variables to have a value of zero?

I was interested in tracking the versions of QuickTime my users have installed. As suggested in an earlier question, I have set up a custom variable and built a report around it. Here is my code for ...
3
votes
1answer
2k views

Hide email adress with JavaScript

I read somewhere that hiding email address behind JavaScript code, could reduce spam bots harvesting the email address. <script language="javascript" type="text/javascript"> var a = "Red"; ...
3
votes
4answers
3k views

How to hide h1 and h2 tags using JavaScript while still having them for SEO

My website does not currently use H1 and H2 tags, but I want to use them and hide them to make my site SEO friendly.
3
votes
2answers
353 views

Can Google crawl dynamic structured data added in a window.onload() event?

I inject some JSON-LD into a page dynamically via Javascript, when I test the page using Google's Structured Data Testing Tool, the expected output appears and I can see the Product Element is ...
3
votes
2answers
774 views

How can I create links in javascript that are crawlable by search engines?

If I use JavaScript + jQuery, for example, does links inserted in $(document).ready() will be available for crawling? How can I insert crawlable links in JavaScript?
3
votes
3answers
161 views

Is animating in Navbar a good idea? [closed]

I am animating in my Navbar with GSAP when the page loads. The navbar is being animated in by changing the height from 0 to 100%. The height in css is always set to 0 and it worries me if the ...
3
votes
2answers
2k views

How bad is JS redirects for SEO?

I have a domain with different markets/languages on different URL paths, like example.com/fr for France and example.com/se for Sweden. This way we gets all our pages indexed for each language - great! ...

1 2
3
4 5
15