ServiceWorker: The script has an unsupported MIME type (chrome-extension)
Replacing:
'service-worker.js'
with:
'/service-worker.js' OR './service-worker.js'
in (navigator.serviceWorker.register('/service-worker.js')
Replacing:
'service-worker.js'
with:
'/service-worker.js' OR './service-worker.js'
in (navigator.serviceWorker.register('/service-worker.js')
Error in Service Worker.
Uncaught (in promise) TypeError: Failed to execute 'Cache' on 'addAll': Request failed.
Main cause of this is typo in one of the filenames/ OR file is not exists that had added to cached_urls. It did not match the name of the real file so I kept getting the error.
I Got this issue due to typo in the filename and found it by quickly setting cached_urls to an empty list and found that the error went away.
To help Google algorithms understand separate mobile URLs, we recommend using the following annotations:
rel="alternate"
tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site's mobile pages.rel="canonical"
tag pointing to the corresponding desktop URL.google support two methods to have this annotation: in the HTML of the pages themselves and in sitemaps. For example, suppose that the desktop URL is http://example.com/page-1
and the corresponding mobile URL is http://m.example.com/page-1
. The annotations in this example would be as follows.
On the desktop page (http://www.example.com/page-1
), add the following annotation:
<link rel="alternate" media="only screen and (max-width: 640px)"
href="http://m.example.com/page-1">
On the mobile page (http://m.example.com/page-1
), the required annotation should be:
<link rel="canonical" href="http://www.example.com/page-1">
This rel="canonical"
tag on the mobile URL pointing to the desktop page is required.
Google support including the rel="alternate"
annotation for the desktop pages in sitemaps like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://www.example.com/page-1/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)"
href="http://m.example.com/page-1" />
</url>
</urlset>
The required rel="canonical"
tag on the mobile URL should still be added to the mobile page's HTML.
All done!!!
We can use Case and CHARINDEX to split column with delimiter into two columns in SQL Server
select
case when CHARINDEX('_',name)>0
then SUBSTRING(name,1,CHARINDEX('_',name)-1)
else name end firstname,
CASE WHEN CHARINDEX('_',name)>0
THEN SUBSTRING(name,CHARINDEX('_',name)+1,len(name))
ELSE NULL END as lastname
from emp
you can use CASE command to control is last name available.
MS SQL Server:
Query 1:
declare @t table (id int, name varchar(50))
insert into @t (id,name) values( 1 ,'abc_rao')
insert into @t (id,name) values( 2 ,'nani')
insert into @t (id,name) values( 3 ,'hari_babu')
insert into @t (id,name) values( 4 ,'kalibabu')
insert into @t (id,name) values( 5 ,'ab_tan')
select
case when CHARINDEX('_',name)>0
then SUBSTRING(name,1,CHARINDEX('_',name)-1)
else name end firstname,
CASE WHEN CHARINDEX('_',name)>0
THEN SUBSTRING(name,CHARINDEX('_',name)+1,len(name))
ELSE NULL END as lastname
from @t
| FIRSTNAME | LASTNAME |
|-----------|----------|
| abc | rao |
| nani | (null) |
| hari | babu |
| kalibabu | (null) |
| ab | tan |
In order to force a secure connection on our website, it is necessary to set up a certain HTTP/HTTPS redirection rule. This way, anyone who enters your site using a link like “domain.com” will be redirected to “https://domain.com” or “https://www.domain.com” (depending on your choice) making the traffic encrypted between the server and the client side.
Steps to setup an IIS HTTPS redirect:
Add password protection to your online store
You can
add password protection to your online store.
Steps:
Edit your password page settings
You can edit the content that shows on your password page, such as the text, colors, and typography.