1 of 2
1
Strange letter and numbers after CSS link
Posted: 04 December 2007 09:15 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi there,

I’ve just noticed that my CSS is being rendered with some strange numbers (.v.1196823134) after it:

<link rel="stylesheet" type="text/css" media="screen" href="http://www.mywebsite.com/index.php?css=my_css_template/screen_css.v.1196823134" />

These strange numbers following the ‘screen_css’ are not in the template so I wonder why they’re appearing?

I did change the name of the ‘my_css_template’ template group, but then changed it back again.  I’m not sure if this issue happened before or after I did that so I’m just mentioning it for completeness in case it does make a difference or mess things up?

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 05:36 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Just to follow-up, here’s the code I’m using to call the stylesheet:

<link rel="stylesheet" type="text/css" media="screen" href="{stylesheet=my_css_template_group/screen_css}" />

Any ideas?

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 08:10 AM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  24513
Joined  05-20-2002

I just did a copy/paste and can’t replicate.  If you paste just that code in an empty template- does the same thing happen?  And- I can’t really imagine a browser adding anything like that- but what browser are you using and what build/version of EE?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 05 December 2007 08:41 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi Robin,

I just copied and pasted it into a new template and still got a strange number after it, this time, ‘.v.1196855486’

It happens in Safari 3/Mac, IE7/PC, and Firefox 2/PC.  I’m using EE build version 20071114.

Any other ideas to debug this?  The CSS stylesheet displays fine otherwise, and I’ve just had confirmation fro my colleague that it was also showing this funny code BEFORE I changed the template group name and back again, so that was a red herring.

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 08:53 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  24513
Joined  05-20-2002

I’m coming up with nada- do you have any extensions installed?  And that’s the exact code you are using:

<link rel="stylesheet" type="text/css" media="screen" href="{stylesheet=my_css_template_group/screen_css}" />

And if you put that all by itself on the test template- you still get the v. bit added when the code is rendered?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 05 December 2007 09:10 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  891
Joined  02-05-2002

It looks very much like a trick some people use to force a browser to always reload the stylesheet (prevent caching)

The trick is to add a timestamp as a variable to the end of the stylesheet name so the browser will think it is a dynamic file.

something like this

<link type="text/css" href="/styles/style.css?v=1196823134"/>

The number suffix you are seeing sure looks like a unix timestamp to me.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 05 December 2007 09:30 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  24513
Joined  05-20-2002

Good call, Cocaholic.  It’s the only thing I spotted when googling that made sense.  But- it shouldn’t be happening w/out them doing something.  That’s why I’m hoping there’s an extension at play.  It’s just odd.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 05 December 2007 12:10 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi there,

Thanks for the replies.

It’s also happening on the default out-of-the-box template too:

<link rel='stylesheet' type='text/css' media='all' href='{stylesheet={my_template_group}/site_css}' />

Is displaying as:

<link rel='stylesheet' type='text/css' media='all' href='http://www.mywebsite.com/index.php?css=site/site_css.v.1195175556' />

I can confirm that putting the stylesheet link in a blank template still produced thie code, and that the issue was also happening yesterday when I had no extensions or plugins installed.

I’ve submitted a technical support case with our web host too, just in case there’s something strange going on on the server, but I suspect they’re going to come right back to me and say it’s a CMS issue and that they have nothing in place that would do this.

Any other ideas that I can try here?  Or any other debugging methods to eliminate things?

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 12:25 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi there,

I’ve just got this response from our web host:

That number is epoch time, or the number of seconds it’s been since Jan 1st 1970(the official beginning of time, as far as unix is concerned). The webserver itself doesn’t know how to write any files except the logs, therefore, something other than the webserver is writing these files with the timestamp on it. However, the webserver does run server side technology and php has functions for epoch time. I’d ask the cms support team to dig a little deeper to try and get to the bottom of this issue. Please let me know if there is more I can do.

Appreciate any other ideas you might have?

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 01:20 PM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  891
Joined  02-05-2002

Did you check the following files?

index.php
path.php
config.php

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 05 December 2007 04:37 PM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi Cocoaholic,

What is it I should be checking in these files?

I’m using the MSM though this issue is happening with the master site as well as the sub-site.

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 04:56 PM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  17378
Joined  06-03-2002

From the 1.6.1 changelog:

Modified the {stylesheet=”“} tag to allow browser caching of CSS files and built in versioning of stylesheets

This allows the browser to have long caches for your CSS template. This helps the browser to see it as the same file, and it will not try to make a request to your server for the CSS file again until a new version is submitted in the Template Manager, which will update that link to include the new edit date.  That forces the browser to see it as a new file, and retrieve it.

 Signature 
Profile
MSG
 
 
Posted: 05 December 2007 05:04 PM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  891
Joined  02-05-2002

meaning the v.1196823134 was added by EE?
That’s good to know, thanks Derek!

Is this info available in the docs?

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 05 December 2007 05:08 PM   [ Ignore ]   [ # 13 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  17378
Joined  06-03-2002
Cocoaholic - 05 December 2007 05:04 PM

meaning the v.1196823134 was added by EE?
That’s good to know, thanks Derek!

Is this info available in the docs?

Yes, but it appears only in the changelog.

 Signature 
Profile
MSG
 
 
Posted: 05 December 2007 05:27 PM   [ Ignore ]   [ # 14 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Thanks for explaining this Derek.

Now that I know it’s not a bug, I’m relieved. But is there a way of setting the link to the stylesheet so that this versioning does or doesn’t appear?  Or is this now a standard feature for everyone who upgrades to 1.6.1?

Thanks,

Ste

Profile
 
 
Posted: 05 December 2007 05:32 PM   [ Ignore ]   [ # 15 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  17378
Joined  06-03-2002

This is a standard feature, and I can’t think of why you’d want to disable this, but ExpressionEngine will only add this information if you are linking to your stylesheets with the {stylesheet=} path variable.

 Signature 
Profile
MSG
 
 
Posted: 05 December 2007 05:35 PM   [ Ignore ]   [ # 16 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

To be honest, I can’t think of a solid reason either - except that I didn’t like the numbers ruining my lovely ‘clean’ CSS link! wink  And it validates too, and I assume there are no browser compatibility issues, so all’s good!

Thanks,

Ste

Profile
 
 
Posted: 17 December 2007 12:00 PM   [ Ignore ]   [ # 17 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2021
Joined  03-26-2006

Yes, I noticed the change too with 1.6.1. I thought this was a very nice new feature.

 Signature 

ryan masuga
—————
Masuga Design (EE Pro) | devot:ee
MD Markitup | All Add-Ons
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 24 January 2008 05:48 AM   [ Ignore ]   [ # 18 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  227
Joined  11-12-2002

During the development cycle this feature is a nuisance! I tend to use CODA now to edit templates from saved copies out of the EE templates. I find that editing the CSS outside of EE - the fresh CSS isn’t getting picked up and I have to go back into EE and edit in the template. Yes I know I could edit the CSS quite separately, but this causes a problem having a CSS outside of the templates.

I guess what I am asking here is - can this feature be turned off as an option somewhere?

 Signature 

PageToScreen

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 77469 Total Logged-in Users: 46
Total Topics: 101511 Total Anonymous Users: 20
Total Replies: 544251 Total Guests: 259
Total Posts: 645762    
Members ( View Memberlist )