how to load assets and files from cdn in contao to increase page speed - contao

I am using contao 4.5.8 . Can I use the root configuration " Assets URL "
to load my assets from a cdn ? Any other configuration needed for my requirement ? I fount an issue belongs to TinyMCE ,is this fixed ? And I also need to know alternatives for rackspace .

Contao supports a Pull CDN via the Files URL & Assets URL in the website root configuration, yes. No further configuration on Contao's side is required. As the names suggest, the Files URL will be prepended to any URL pointing to the files directory, while the Assets URL will be prepended to any URL pointing to the assets directory.
On a side note: Contao 4.5 already reached the end of its life a few months ago, you should update to Contao 4.6.

Related

Create-React-App absolute paths to JS and CSS in prod build

I'm using create-react-app and in prod I'd like to serve the JS and CSS and other static assets on s3, but serve the index.html file from another location. However, the URLs in the built files are all relative paths.
Is there a way (without ejecting) to use absolute URLs in the production build?
Apparently this is achievable with the PUBLIC_URL environment variable. I was under the impression this variable was intended to be used if the React app would be living in a sub-directory, in order to fix client side routing. However, by adding:
PUBLIC_URL=https://<my-s3-bucket_url>
The URLs in all files become absolute URLs instead of relative URLs.

Links issue when I deploy my Hugo site as a Github Pages project

I created a Hugo site that working well locally. I deployed my Hugo site as a Github Pages project via a /docs folder on the master branch.
So now, I have my Github Page project and my URL looks like that:
https://myname.github.io/myrepository/myHugoSite.
I have a problem with my link. All my links redirect to https://myname.github.io/ but not https://myname.github.io/myrepository/ because my links are /next-page/. These links are working locally because I don't have a repository.
My question is: Do I have to add /myrepository/ to all my links or there is another solution?
You need to add your site prefix to the baseUrl parameter in the config file. In your case the prefix is myrepository/
If you are using TOML format in your config file it would look like this:
baseUrl = "https://myname.github.io/myrepository/"
Note that with Higo 0.62.1 (and more recent), you can have portable links.
See bep/portable-hugo-links as an example.
truly portable Markdown links and images. No shortcodes used.
This page includes the following links, which would be rendered correctly both on GitHub and Hugi generated pages:
* [Blog Link1](../blog/p1/index.md)
* [Blog Link2](../blog/p2.md)
* [Home Page](/README.md)
* [Local Anchor](#et-illis-ossaque-loqui-ille)

Umbraco preview not working

When I change content of our web site from umbraco and try to preview it is not working. This is because the required umbraco js and css files are not loaded. Our site is hosted in a IIS virtual directory(eg: /localhost/mySite)
The correct path should be for the umbraco files should be,
http://localhost/mySite/umbraco/assets/css/canvasdesigner.css
but the js and css file paths are taken as,
http://localhost/umbraco/assets/css/canvasdesigner.css
Does anyone know how to solve this?
I think this is an issue with relative URL's within Umbraco - you should try setting up your web site as a new web site in IIS with a new record in your hosts file.
You need to make a change to your /config/umbracoSettings.config
Add true under in the umbracoSettings.config file in the config folder.

Favicon with Meteor?

I'm trying to load a favicon into my Meteor project but I can't get it to work. I tried using this tutorial but when I put the mentioned reference in the of my HTML nothing happened. Also what do they mean by /public directory? I don't have a /public directory, should I just put my favicon.ico in the root directory?
The public directory doesn't exist by default - you just need to create it. Meteor uses the public directory in the root of your app to serve plain files rather than bundling them in the app. In order for a <link rel="icon"> tag to work, it needs to point to a file that exists in public. Note that the URL to the icon will not contain the path "public/" - files in public are served as if they were at the root of your web server.
A new Meteor app doesn't include any folders except the required .meteor directory. However, it will treat folders named public, private, client, server, and lib specially. You can also create more arbitrarily named directories. This affords you a lot of control over the exact structure of your app. Read about the Meteor directory structure in the Documentation:
Lastly, the Meteor server will serve any files under the public directory, just like in a Rails or Django project. This is the place for images, favicon.ico, robots.txt, and anything else.
Create client/header.html: <head><link rel='icon' href='/favicon.ico'></head>
Put you favicon.ico into /public folder.
Start server, open your browser and see the result.

html5 offline cache is caching all files instead of cached files that are listed

I am trying to use offline caching of html5. But problem is it is caching all html files and not the ones I mentioned in cache manifest file:For ex: I have 4 html files: index.html, test.html, sample.html, fallback.html and I have sample.appcache manifest file that contains:
CACHE MANIFEST
index.html
sample.html
NETWORK:
test.html
FALLBACK:
/ /fallback.html
I dont have manifest="sample.appcache" attribute set in any html file. I am using JBoss 5 AS and in web.xml I added mime mappings as follows:
<mime-mapping>
<extension>appcache</extension>
<mime-type>text/cache-manifest</mime-type>
</mime-mapping>
So only index.html and sample.html needs to be cached offline but test.html is also getting cached if it was hit earlier when server was up. The fallback.html is not getting called when server is stopped in place of this test.htmlWhat is wrong with this setup?Second thing I did not understand is on IE(v9) and Firefox(v19) I don't have to set mime-mappings but for application to work on chrome(v26) and safari(v5.1.7) this setting is indeed mandatory.
I have not worked with JBoss, but the reason that Chrome and Safari want the MIME type for the appcache is because otherwise it has no way of identifying it as an cache manifest. Simple solution is to just include it :-P
As for the caching, where are you seeing it cached? Is it for sure being stored in the offline section? Keep in mind that files will still be cached like normal regardless of the cache manifest.

Resources