html5 boilerplate issue in chrome 16.0.912.63 - html5boilerplate

Does anyone else experience issues with html5 boilerplate with chrome 16.0.912.63? Just downloaded it and when I open index.html it takes about 40 seconds to render. Looking in Chrome developer tools it appears that the protocol relative url
//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
is causing the issue. If I add the http: to the URL it seems to retrieve jquery in a reasonable amount of time, but then the modernizr.js script has issues retrieving ga.js.
I assume there are many people using boilerplate with Chrome, but I didn't see anything on the boilerplate site that indicates this a common problem. Is it possible I have configured something incorrectly?

I think boilerplate explain this issue here http://html5boilerplate.com/docs/FAQs/. They recommend to use local dev server instead of using file:/// schema to avoid this issue.

On Unix systems go to your terminal and navigate to your project and type:
python -m SimpleHTTPServer
index.html page will be on http://localhost:8000
On Windows, copy the Mongoose executable to your project folder and launch it. index.html page will be on http://localhost:8080

Related

How to get liveserver to render django templates?

I've been messing around with a tutorial site, and I found that my VS Code LiveServer plugin doesn't work properly when I try to open Django templates. The CSS I applied is missing (although everything renders correctly in my local development sever), and the template language code is actually printed to the screen rather than executed (see image below). My liveserver plugin appears to be working with html files outside of Django.
(1) Right now I'm right clicking and selecting "Open with Liveserver." Is this wrong for Django? The liveserver docs recommend trying to "visit the Actual Server Address: http://localhost/[workspace], not the VS Code extension's Live Server Address: http://127.0.0.1:5500/". I tried including the file path in place of [workspace], but no luck. What do I do here?
(2) I saw in another thread where someone recommended their own solution, here. I'm not sure where I'm supposed to run the './manage.py livereload' command, but it's not working in command prompt. What is the difference between './manage.py' and 'py manage.py'? And will this solution be any better than the VS Code plugin?
I have had the same problem as you and managed to get it working with the link you included in point (2) of your post. You may have gotten sorted by now, but I thought I'd post it here in case.
First I went to my console and ran:
pip install livereload
which was installed successfully. Then I added 'livereload' to my installed apps in my settings.py file. E.g...
INSTALLED_APPS = [
...
'livereload',
...
]
Then I went to the directory containing my manage.py file on the terminal and ran
./manage.py livereload
and this provided me with a link to a live update server. Previously I had been running a server with "python manage.py runserver", so this is to replace that command.
Now when I save any changes I make in my IDE, they update live on the browser.
Sorry that I haven't included any screenshot images for clarity, I wasn't able to for some reason.
I am working through Scrimba/VSchool tutorial, so I am wondering if you may have run into this problem through a similar path.
I believe Live Server and Django are incompatible - but if you find a fix, let me know.
Live server is acting as your web server (port 5500 by default), serving up files as your make changes.
Django is also acting as a web server (port 8000 by default), interpreting Python code, and rendering the Django Template Language.
Unfortunately, as far as I can tell, live server cannot execute all this Python code, so all the Django Template Language will not render. This includes the {% load static %} method that Django uses to read the CSS & JS links in the html.
For those of you who tried the top answer, but still got stuck: you have to install dj-static, or whitenoise (as recommended by the dj-static github page) to serve the static files. I noticed that it's really slow though. Maybe it's just me, but I found it to be quite unworkable. I ended up writing an autohotkey script to activate my browser and then refresh. At least for me, that´s a lot quicker.
in your command line you have to run the server by the following command:
python manage.py runserver
but be sure that you are in the directory that has manage.py file. you don't need to type the port. because you will get the default port which is:8000

Codekit 3 - External Server Issue

I've been using codekit for ages now, and now I've been using the version 3 since it came out.
I really like this app, but there's something I never really understood and I decided to post it here (hoping to finally understand how this works and how to make it works like I want).
I have MAMP pro installed, with some hosts.
Let's say I have this list of hosts with (fake) document root:
localhost -> documents/site1/dist
test -> documents/sitetest/dist
and let's assume that test is a wordpress site having the site url set to
http://test/ in the database.
In codekit, when I enable the browser refresh, the bottom options asks me to write down the address I would visit to see my website.
Now, if I navigate to http://test/ my WordPress website loads and I am able to see everything.
In codekit I then setup the browser refreshing options to be the following:
Animation: ticked
Refresh Delay: 0.0 seconds (default)
Preview: empty
Document-Root Subpath: empty
External Server Required: on
External Server Address: http://test/
Then when I click on the green dot (server) to preview my website, I'm expecting codekit to navigate to http://test:5757 and to properly display my website. This, unfortunately, is not the case. When I click on the preview (or server, it doesn't really make any difference for me) codekit navigates to my mac IP and the website is either not loading or loading without any external resource.
I don't think the issue is in the way I load the resource in WordPress (i use enqueue sources properly, and the website without using codekit refresh function works, load and displays as meant to).
So far, I always switched my current project to use the localhost host (changing the document root in MAMP pro) and then telling codekit to use the localhost ip as external server, but now it's a bit more complex, as I have way more projects and I was hoping not to change back and forth the document root to use codekit built in refreshing feature.
Is it possible? am I missing something here?
I read all I was able to find as well as watched the videos on codekit, but this bit here is still a bit unknown to me and any help would be really appreciated.
Thanks
PS: No need to mention I am on a MAC, right? :)
I don't believe I actually managed to fix this.
I'll leave the answer here in case somebody else is facing the same issue.
The problem I had was that my website http://test/ was using a theme called test.
Codekit, for refreshing the browser, uses a simple string search and replace in the URL, and so everything that looked like "test" in the url was replaced by the internal ip.
Quick example:
http://test/wp-content/themes/test/index.php
became
http://192.168.0.1:5757/wp-content/themes/192.168.0.1:5757/index.php
and of course no file where loaded successfully, as the path was wrong.
To fix this?
Just change the MAMP pro address to something that won't be present in the URL (in my case, the MAMP pro host called test became dev.test and problem solved.

Vaadin Valo Stylesheets

I'm having a problem using Vaadin (in Eclipse) and its associated styling engine Valo, and the TouchKit package. I mention all of these because I'm not sure which, if any, is causing the problem. The name of my custom theme (which imports Valo) is simply "touchkit".
I have the project running on a Tomcat server on localhost and accessible in my browser. I wanted to tweak some of the CSS so I edited the appropriate file WebContent/VAADIN/themes/touchkit/touchkit.scss. After editing this file, I recompile the theme and see the appropriate changes in the generated file styles.css. Then I go to load up the application in my browser, and things get weird.
I can load the page and, using Chrome's developer tools, see that the page requests styles.css for download, as expected. It gets a 200 OK response from the server, but when I view styles.css, it contains just a single \n. This is also true in Safari. Even using cURL to download styles.css yields the same result. In the Eclipse editor, and when I inspect it in the terminal, styles.css is ~12,000 lines long. Why can't my browser or cURL get that data?
I can view similar project demos on Vaadin's own site and the stylesheet (which should be almost identical to mine) is loaded correctly. Also, other Vaadin projects on my localhost server have their stylesheets loaded correctly (though they do not use Valo). Compiling the theme in Eclipse yields no errors. Because the issue presents itself across a variety of graphical and non-graphical clients, I'm starting to think the issue is with Tomcat. But I can get to the directory from which Tomcat serves files and styles.css is correct in that folder too. There's no apparent reason that Tomcat would be serving a blank file.
You may have guessed from the description, but I'm working on a Mac. Any help is appreciated!
PS Mods - I also asked this question over at Superuser since it wasn't 100% a programming question. However, I'm new at Superuser and couldn't create tags for Vaadin or Valo, so I'm asking here where there might be a better chance of getting an answer.
Hard to say, since your are doing everything fine. My best bet would be the tomcat implementation you are using, maybe there's something weird there. Try upgrading to latest if it's not or to a previous version.
FYI I'm using Tomcat 7.0.55.
PS: your attempts are in run/debug from eclipse or have you made a .war form the project and deployed it with the Tomcat-Manager?
Regards
add below to your gwt.xml, and touchkit is not valo aware see https://vaadin.com/forum/#!/thread/8264224/8264223
<set-configuration-property
name='touchkit.manifestlinker.additionalCacheRoot'
value='src/main/webapp/VAADIN/themes/MyTheme:../../../VAADIN/themes/MyTheme' />

Dreamweaver CS6 Site Setup for Test Site with MAMP and WordPress NIGHTMARE

I have been trying to set-up a test site server on Dreamweaver CS6 IDE (which I hate) to try out the Dynamically-related files theming feature. I have been attempting to do this for hours and looked at more tutorials and blogs than I can remember attempting to set-up a test site so that I can simply try out this feature but nothing seems to work.
On the Site box I have:
Site Name: test site
Local Site Folder: users/myname/Sites/wordpress/
On the Servers I have:
Server Name: Apache
Connect using: Local/Network
Server Folder: users/myname/Sites/wordpress/
Web URL: http://localhost:80/wordpress/
Advanced:
Server Model: PHP MySQL
Yet I am receiving the an Error message:
Dynamically-related files could not be resolved because the site
definition is not correct for this server
Which makes no sense to me. Can anyone explain what am I doing wrong?
"i was under the impression that this feature would somehow convert PHP syntax into HTML so that it can be easily edited..."
What in God's name gave you that impression? PHP is server-side scripting; a way for the browser to communicate with the server and database and HTML is a way for the browser to communicate with the client (you) and render things in a form which is usable by humans. There is no "conversion", as they are two universally different languages, each serving unique functions.
In order to "easily edit" PHP, the only solution is to learn PHP scripting and syntax.
MAMP's sole purpose is to install an Apache server, PHP, and mySQL on your local computer for a server-side/database framework, such as WordPress, to store information and communicate with. Essentially like creating a mini web-host on your local machine, allowing you to check the functionality of PHP based applications.
These setting are working for me:
Open the Dreamweaver Site Setup window
Select "Servers"
Server Name: localhost
Connect Using: Local/Network
Server Folder: MAMP/ /Applications/MAMP/htdocs/your_directory_name/
Web URL: http://localhost:8888/your_directory_folder/
For a full explanation: http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html#articlecontentAdobe_numberedheader_2
I have come across the same issue and found this thread.
The post that explains a bit what we want to hear is post #6 by David_Powers on 01-May-2010 at 05:31.
So to make the problem go away you can go to 'Edit -> Preferences' and disable 'Discover Dynamically-Related Files' while leaving 'Enable Related Files' activated.
Although this fixes the error display I don't quite understand what David_Powers says this function will do and if I actually want it turned on. If someone could help me realize what this option does I would appreciate it.
I don't know if this is relevant, but after many tries to figure out the Server not found error, I stumbled across MAMP Preferences on the start up page.
After clicking on Preferences, I noticed that the Document Root was pointing to username/Sites instead of MAMP/htdocs.
MAMP Preferences > Document Root > browse to select
After I set the Document Root folder to htdocs, I finally got Dreamweaver CS6 to display my php file when I clicked the Live button in split screen mode.
None of the other answers I searched mentioned setting MAMP preferences to the Document Root folder. I hope this helps.

Flex file upload issue io error #2038 over HTTPS

Hi i have a flex file upload application over https it works fine on all IE browsers.
Recently a client with IE9 reported a complaint that she's not able to upload files.
I can see the error generated is IO Error #2038.
The adobe documentation says 2038 is File I/O Error.This error occurs when an application can't get file size, creation date or modification data using the FileReference API.
Can some one help me point out what could be the issue here.
All i can think of is browser issues like, browser cache, some new configuration in IE9 am unaware of or permission on the client directory.
Help will be much appreciated.
thanks
I suggest you to use Charles debugging proxy, which is must have tool for all Flash/Flex developers, and see the difference in IE8 and IE9. Maybe the problem is in some HTTP headers or something else.
I have a similar issue. Later I found out that upload feature doesn't work for latest version of flash player over https. Then I tried sending the upload requests via http instead of https. Now its working fine. Try this, it may help in your case aswell.

Resources