I often see people use urls like below for CDN resources.
<script src="//site.domain.com"></script>
I wonder how it's different for browser if it was specified like "https://site.domain.com"
It means "keep the same scheme" than the actual document.
See shorthand http:// as // for script and link tags? anyone see / use this before?
UPDATE : correct link.
Related
In Kentico 8.2 the sub-page in the URL is misspelled. The Name Path is spelled correctly.
I see that under Pages > Properties > URLs there is a place to change the alias name. Will correcting the spelling here affect anything drastic change in the website (say, in the code)? I'd be inclined to say No, but I wanted another opinion.
Technically speaking of you make the modification/update Kentico will keep an alias of the misspelling so if anyone has reference to it, they can go to that bad URL and be redirected.
If there is custom code looking for that misspelled URL then it will have to be corrected but as you stayed probably not.
If webparts or widgets refer to that misspelled URL in the path property, they will have to be corrected. You will notice this right away on pages of they are referencing that misspelled URL because your content won't show up.
If you change the page-alias it will add the old alias to the list of page aliases (ie. old links to the page should still work).
Are you specifically using that page-alias in code anywhere to identify the page?
similar to:
var aliasPath = tree.SelectNodes()
.WhereLike("DocumentName", "Tutorials").FirstObject.NodeAliasPath;
but referring to the alias field instead.
Would the page be linked in any wysiwyg editors? I'm not sure if behind the scenes kentico would use page-alias in this instance or the document guid. Although if you retained the old misspelled alias then existing links should work.
I have recently moved my wordpress site from "test.xxxxxx.com" to "xxxxxx.com" They are both identical except I just want to get rid of the "test" portion of my url on my index page and all my links. They are both on the same FTP and server. I transferred my site and have the homepage url working correctly but when I click on any of the links it still says "test" in front of the url. I have tried a couple different search and replace plugins with no luck. Is there a better way to go about this?
Wordpress has a problem that it doesn't update the permalinks easily. So, maybe you will have to change the permalinks manually in the wordpress database.
Use Better Search Replace plugin in order to fix old urls in your database.
After downloading and activating the plugin, you juste have to type old url to find and by which url to replace it, in your case you have to do it twice :
test.xxxxxx.com to xxxxxx.com
and
test.xxxxxx.com/ to xxxxxx.com/
I advice to do it twice because sometimes the plugin make difference between these two (strict string comparison I think) and wil not modifiy everything with only one command
I am using grails 2.0.1 and i tried linking to the html page using with the direct url="somefile.html> but it is not working out . How do i do it ?please help
You need to do two things:
Make sure the file is stored under web-app/somefile.html, this is where you store raw files for the server.
Instead of using a hard-coded URL, use the g.resource() method or the <g:resource> tag. In these cases, you'll use it like so:
My Link
The reason to use the g.resource tag is it guarantees a correct link to the file. If you just hard code the file like href="somefile.html", then is is a relative path. If you are at the URI myapp/controller/action/foo, it will look for the file under myapp/controller/action/somefile.html.
Note: If you are using the cached-resources plugin or something similar, you will find the output URL is not actually myapp/somefile.html. The file is still accessible from that location, but the generated links will point to a static URL instead.
Is it possible to add a comment by default when using google plus share link?
The url is the following
https://plusone.google.com/_/+1/confirm?hl=en&url=URL_TO_SHARE
I've trieid adding &message=MESSAGE but that didn't help. Also tried &comment and &text
Just to warn you, this is not an officially supported part of the Google+ platform. I strongly recommend that you use the +1 button to share content to Google+.
That being said, there is no paramater that you can set to specify the message. The closest you can get to this is to use schema.org, open graph or HTML meta elements to specify the description of your target URL just like the +Snippet for the +1 button.
My situation is the following:
I have an index.html and some JavaScript that loads HTML snippets from the server. Inside these snippets, I have some URLs to images like
/some/folder/picture.jpg
Of course these do not work in PhoneGap. Weinre tells me that PhoneGap is trying to load the picture from
file:///some/folder/picture.jpg
Any ideas how to solve this? I was thinking about something like a base href, or some configuration in PhoneGap where one could specify a root path, but I did not find anything like that ...
Thanks,
Michael
I had the same problem especially when you have a lot of views (pages) and want to load one from a menu, yet you are at an unknown location.
The simple work around is to use the window.location object.
window.location.href.split('www')[0] + 'www'
This gives you the absolute URL to your 'base'. The www is the folder which is relevant for IOS and Android, so this also makes your app compatible in multiple platforms.
From this you can use a regular expression which passes the entire doc like jquery mobile does with data-* attributes to describe their elements. You simply replace the regular expression with the path returned. You'll want to do this during initialisation otherwise it will create a massive bottle neck.
Hope this helps and is along the lines of what you're looking for.
Cheers,
Sententia
You can't do that with a <base> because / is always host-relative — it can't be redefined to be in a subdirectory. You have two options:
rewrite your HTML to use fully relative paths like ../../some/folder/picture.jpg (or have something do the rewrite for you as a build step), or
alter the "browser" (PhoneGap's wrapper) so that it loads URLs differently.
I'm not familiar with PhoneGap so I can't comment on automatic options, but I personally would start using relative URLs.