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
3
votes
2answers
54 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 ...
1
vote
0answers
12 views

Volunteer Web Application to Connect People [closed]

Apologies if this is in the wrong place, please move or suggest a move if appropriate. I have some free time on my hands for the foreseeable future. In order to help people in the current climate I ...
0
votes
0answers
7 views

Is hiding content using CSS could impact SEO? [duplicate]

Recently I developed my own plugin to animate contents on scroll - when the page is scrolled down to an element, a class will be added to it (a class with animation that changes the element's opacity ...
3
votes
1answer
2k views

How do I use the ga() function in Google Analytics when the tag is in Google Tag Manager: Uncaught ReferenceError: ga is not defined

I'm following this: But in my real code, I've used google tag manager to manage google analytics. So I have just one script in the head of my website which belongs to gtm: (function(w,d,s,l,i){w[l]=...
1
vote
2answers
58 views

Can you put all the text in a static tag for SEO but completely re-write the page with JavaScript?

Can our website used the trick: putting all SEO data in some tag, but rendering all the web page elements with JavaScript? How would that work for SEO? May be like: <div> <a href="/about"...
7
votes
2answers
5k views

How to check if linked JavaScript and CSS files are being used?

I've inherited a website that seems to import every JS and CSS framework my predecessor could think of. Is there an easy way to analyze the site and determine which ones are actually being used? Or ...
1
vote
0answers
15 views

Google Search not properly indexing AJAX-loaded pages [closed]

I have a static website which uses async jQuery to generate articles (as well as titles and other metadata) sourced from a file (something like $('main').load('/data #location.pathname')). The only ...
1
vote
1answer
75 views

How to show backup ads now that AdSense doesn't have the ability to do so for you?

AdSense script results in three things: An ad. A blank space the size of a ad. No ad or blank space added. AdSense used to have a setting to allow you to show a backup ad in case of #2 and #3, but ...
0
votes
0answers
22 views

How can I enable compression on gtmetrix?

If I test my website on the gtmetrix, there appear like this : How can I solve this problem?
0
votes
0answers
9 views

How to fix slow loading React bundle [duplicate]

I found https://caseyjkey.com/component---src-pages-index-js-16e07fb51b32a6d8779f.js takes a few seconds to load. What is this file, and what tools are available to help me optimize it? When my first ...
1
vote
1answer
16 views

Screaming frog crawling, images, JS and CSS files as well

When I plug in my website URL in the free version of Screaming frog, it also lists the images, CSS and JS files. Is it suppose to be like that?
2
votes
2answers
38 views

How to check if a file loads in JavaScript?

I currently have a lot of data hosted on sites that our not ours, mainly for images. I do have permission to utilize these images but would like to add backup URLs. Much of the data is hosted on ...
2
votes
0answers
18 views

Pagespeed - Render Blocking Resources [closed]

I know there are a few questions on this but I was wondering where I can actually see the scripts that are blocking rendering. Pagespeed Insights will provide a few scripts and CSS, but is there a ...
1
vote
1answer
24 views

Making HTML text dofollow link with JavaScript is effective for SEO?

I wanted to replace match text to html link in content area in each post on WordPress site. I implemented that by JavaScript as follows. jQuery(document).ready(function(){ var selector = `...
0
votes
0answers
46 views

Is javascript filter library good for SEO?

I'm currently working on a filter that can contain functionality such as search, sort, pagination, checkbox like in the following image. For now, I use Laravel and trust every functionality to the ...
2
votes
2answers
305 views

Google SDTT does not fetch structured data by URL

I initially wrote some code that created the structured data for breadcrumb and product markup on the server's side and rendered them in the <body> of the page. While the mark up was correct ...
0
votes
2answers
44 views

How to get search engines to index dynamically created DOM page

My website's main page has very little content on it until after a javascript function loads all the images to the page. The function is called on the window.onload event. My only problem is search ...
8
votes
1answer
920 views

Googlebot encountering JavaScript errors due to rendering outdated HTML files with newer JS files

We recently encountered an issue where we added a JavaScript variable (e.g. var GLOBAL_VAR = true;) to an HTML page (e.g. /Search/Index) and updated the separate JS file (e.g. /Scripts/search/index.js)...
1
vote
0answers
419 views

What is Script Evaluation?

"Reduce JavaScript Execution Time" is one of the generated issues Lighthouse can detect auditing any URL. Sometimes it's reporting a specific file is taking a lot of time in Script Evaluation phase. ...
1
vote
1answer
35 views

How to pass JavaScript errors to Google Analytics using Google Tag Manager

I've read this article: https://support.google.com/tagmanager/answer/7679411?hl=en It's pretty straight forwards: To configure a JavaScript error trigger: Click Triggers and then New. Click ...
0
votes
0answers
12 views

Error caching static js files in my htaccess file. What does this error mean? [duplicate]

I have this in my .htaccess file: <IfModule mod_expires.c> ExpiresActive on # Perhaps better to whitelist expires rules? Perhaps. ExpiresDefault "access plus 1 ...
1
vote
1answer
23 views

Adsense - Proposed implementation of EU user consent policy

I have spent lot of time to understand EU user consent policy with respect to usage of cookies. In summary, as I understand, I cannot save any cookies of my websites (including analytics cookies, ...
0
votes
0answers
16 views

How can make sure my app Module will be always available to Google Search Console (AngualrJS app)

I'm trying to test some of my web pages on Google Search Console. Some of the times i can see the content of the page i look for (but without the dynamic HTML), and sometimes I'm getting errors like - ...
1
vote
1answer
36 views

Improve SEO by forcing web crawlers to read csv file searching for keywords

I am trying to improve the seo of my website and I recently used an online seo tester for my first custom-coded website. I am trying to improve the number of unique keywords and textual content ...
6
votes
2answers
3k views

How do I stop Google from indexing AJAX calls within Javascript?

We are getting a number of odd results come up on Google EG: http://www.somedomain.com/somepage/AjaxFunction.aspx?stuff=XXX&other=XXX When I looked at "somepage" the ajax function is not ...
1
vote
1answer
25 views

GTmetrix says Statcounter slowing website, any benefit to removing its code?

A few years ago, I installed Statcounter code on my website. It's at the end of pages, just before body tag. It loads asynchronously. When I check my pages on gtmetrix, it states that there are 2 ...
2
votes
1answer
39 views

Does it ever make sense to use Javascript for highly repetitive HTML?

I understand concepts of HTML compression, but let's say you have a massive table with huge repeats of table related tags and their respective classes. Instead of every table element having their own ...
2
votes
2answers
517 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 ...
0
votes
0answers
78 views

How reduce the execution time of JavaScript on Adsense script

sorry for my English.. my knowledge for Server Site is very simple... All my Site has on <head> this, <title>my title</title> <meta name="google-site-verification" content="...
2
votes
1answer
127 views

Should I use the 'noreferrer' attribute on my website links (to open in a new window) as a safety measure?

There are many sites on the internet that recommend you to add the noopener noreferrer attributes to your link as a safety measure. This is to avoid malicious scripts from other domains to take ...
1
vote
2answers
313 views

Do errors in Javascript (console errors like reference errors) affect SEO?

Suppose I have an error in my console on a couple of pages, like the following: (index):239 Uncaught ReferenceError: incom is not defined at (index):239 at dispatch (jquery.min.js?ver=1.8.3:2)...
1
vote
0answers
22 views

Months after implementing JS redirects, hash bang URLs are still indexed in Google beside their replacements

We replaced our old site with a WordPress site around 6 months ago. Our old store plugin used links with AJAX fragments which were indexed in Google, like so: https://www.example.com/store.php#!/item/...
2
votes
2answers
4k views

What could be causing this long waiting time on page load?

What could be causing a 1.18s wait time when my page loads? Just to make sure I did not have any conflicting or parallel scripts loading, I completely deleted all the script on my home page and ran ...
1
vote
0answers
25 views

Is there a way to use js templating with wordpress without impacting seo or ux?

I have one JSON file that contains the text content for my hundreds of Wordpress posts. I am using templating, mustache.js, to insert the text content and render the posts. This saves me a lot of time,...
2
votes
1answer
41 views

How to see how scripts are being loaded in a page?

Using the Inspector tool in a browser, a waterfall can be seen. Also the type of cause for loading specific elements is mentioned, and it can be explored further in the Stack tab for that specific ...
1
vote
0answers
60 views

Norton Alert on Java script : Web Attack: Fake Tech Support Website 374

I used JavaScript function to get browser information.I added this code : isIEedge = window.navigator.userAgent.indexOf("Edge") > -1; It has trouble with Norton Anti-virus, I am interested to ...
80
votes
2answers
564k views

How do I open the JavaScript console in different browsers?

Web browsers provide a JavaScript console as part of their developer tools. This console is useful for the following reasons: Errors and warnings that occur on a web page are logged into the console. ...
2
votes
0answers
21 views

Explanation needed with Django and AMP logic using 1 url

I'm using AMP at one of my parts of the website with Django template and python, my question is what will happen to a page (*SEO wise) if I take and break an AMPed page (only on desktop) and leave the ...
1
vote
1answer
122 views

How can I optimize Google Analytics for GTmetrix?

I'm optimizing my website using GTmetrix and I've got good grades, but it's still not perfect. Look at this image for PageSpeed: And this one for YSlow: The picture shows that my value is not ...
1
vote
3answers
1k views

GA Limit of 500 hits per session - workarounds & awareness?

We're currently walking the fine line between gathering as much data about the user journey and interaction with the site - and also being aware of our 500 or bust limit that GA analytics imposes on ...
2
votes
3answers
2k views

JavaScript and CSS cached and not updating not updating from WAMP server even though “view source” shows most recent file

I have a WAMP server with PHP 7.2.10. When I change a file, for example .css, the changes is not visible in browser. When I "view source" via my browser (Ctrl+U) I get the updated latest version of ...
1
vote
1answer
59 views

How can I track button click in google analitycs?

I had register my website in the google analytics and I had put the script in my default index like this : <html> <head> <meta name="google-site-verification" content="**********...
1
vote
2answers
393 views

Can it save the google tag manager script in an external js file?

My default index html like this : <html> <head> <meta name="google-site-verification" content="****************" /> <script async src="https://www.googletagmanager.com/...
0
votes
3answers
51 views

The webpage is in JS but still text browsers are reading the content. How is it? [closed]

I was checking the site giftedandtalented.com. first of all the the source code is so cluttered. When i disabled the JS in my browser, except for top navigation nothing showed up but when i checked ...
1
vote
1answer
239 views

Delete Firefox JavaScript console history?

How do I the clear the command history of Firefox's JavaScript console? Clearing all history, cookies, cache, etc., doesn't clear the JavaScript console history.
3
votes
1answer
45 views

Standard or common way to secure a destination-email-address of a client-side contact-form

I have a website with a minimal, client-side HTML-CSS-JavaScript contact form but I desire to hide the destination email address of that form from the HTML source code so that form users would not be ...
1
vote
3answers
378 views

What are the benefits of utilizing a Web Server vs opening an HTML file directly via your browser

I've just begun coding in Javascript. I'm looking for an in depth answer that explains the features that are available to me when using a web server to serve up my index.html file vs simply opening ...
1
vote
0answers
39 views

How can I improve performance score website in the gtmetrix? [closed]

I test my web with gtmetrix. The result like this : I want to improve grade of add expires headers, compress component with gzip and all recommendation which has a bad grade How can I do it? ...
2
votes
1answer
118 views

How can I combining many external Javascript scripts into one?

I check my website using gtmetrix and my website is recommended for fewer HTTP requests and reduce DNS lookups. So I must to combining combining many external Javascript scripts into one In my layout ...
2
votes
0answers
91 views

Is there a problem in adding Adsense verification code via JavaScript?

I work with a certain CMS (MediaWiki) in which there is no direct control over HTML (as there is in Drupal Twig files for example); Hence, in this case, I have to load my Adsense verification code via ...

1
2 3 4 5
15